Pre-Summer Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: clap70

XK0-006 CompTIA Linux+ V8 Exam Questions and Answers

Questions 4

A Linux administrator is testing a web application on a laboratory service and needs to temporarily allow DNS and HTTP/HTTPS traffic from the internal network. Which of the following commands will accomplish this task?

Options:

A.

firewalld -- add-service=dns, http,https -- zone=internal

B.

iptables -- enable-service= ' dns|http|https ' -- zone=internal

C.

firewall-cmd --add-service={dns, http, https} --zone=internal

D.

systemctl mask firewalld --for={dns, http, https} --zone=internal

Buy Now
Questions 5

Which of the following commands is used to verify whether a port is open on a remote host?

Options:

A.

ip

B.

ping

C.

nc

D.

netstat

Buy Now
Questions 6

A Linux user needs to authenticate to a Windows Active Directory domain. Which of the following configuration files contains the domain configuration details?

Options:

A.

sssd.conf

B.

krb5.conf

C.

pam.conf

D.

smb.conf

Buy Now
Questions 7

A systems administrator is configuring new Linux systems and needs to enable passwordless authentication between two of the servers. Which of the following commands should the administrator use?

Options:

A.

ssh-keygen -t rsa & & ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2

B.

ssh-keyscan -t rsa & & ssh-copy-id john@server2 -i ~/.ssh/key

C.

ssh-agent -i rsa & & ssh-copy-id ~/.ssh/key john@server2

D.

ssh-add -t rsa & & scp -rp ~/.ssh john@server2

Buy Now
Questions 8

Which of the following commands should an administrator use to convert a KVM disk file to a different format?

Options:

A.

qemu-kvm

B.

qemu-ng

C.

qemu-io

D.

qemu-img

Buy Now
Questions 9

A DevOps engineer made some changes to files in a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following commands is the best way to accomplish this task?

Options:

A.

git pull

B.

git reset

C.

git rebase

D.

git stash

Buy Now
Questions 10

A Linux administrator receives reports that an application hosted in a system is not completing tasks in the allocated time. The administrator connects to the system and obtains the following details:

$ uptime

12:47:43 up 22:17, 2 users, load average: 7.75, 5.72, 5.17

Which of the following is the most likely cause of the issue?

Options:

A.

High CPU load

B.

Insufficient disk space

C.

Network latency

D.

Memory leak

Buy Now
Questions 11

(Partial question reconstructed from visible content)

Options:

A.

(not visible)

B.

(not visible)

C.

pam.conf

D.

smb.conf

Buy Now
Questions 12

Which of the following commands can be used to display real-time running processes on a Linux system?

Options:

A.

ps

B.

top

C.

df

D.

free

Buy Now
Questions 13

An administrator wants to see all logs for the app.service systemd process. Which of the following commands should the administrator use to complete this task?

Options:

A.

cat /var/log/messages

B.

systemctl status app.service

C.

systemd-analyze unit-files app.service

D.

journalctl -u app.service

Buy Now
Questions 14

A Linux administrator is configuring a CUPS print service on a Linux machine and needs to allow only connections from a local network (192.168.100.0/24). Which of the following commands should the administrator use?

Options:

A.

iptables -A OUTPUT -d 192.168.100.0/24 --sport 631 -p tcp -j ACCEPT

B.

iptables -A OUTPUT -s 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT

C.

iptables -A INPUT -s 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT

D.

iptables -D INPUT -d 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT

Buy Now
Questions 15

A Linux systems administrator is running an important maintenance task that consumes a large amount of CPU, causing other applications to slow. Which of the following actions should the administrator take to help alleviate the issue?

Options:

A.

Increase the available CPU time with pidstat.

B.

Lower the priority of the maintenance task with renice.

C.

Run the maintenance task with nohup.

D.

Execute the other applications with the bg utility.

Buy Now
Questions 16

A Linux administrator attempts to unmount the local filesystem /data in order to mount a new volume. However, the administrator receives the following error message:

umount: /data: target is busy

Which of the following commands should the administrator run to resolve the issue?

Options:

A.

tree -g /data

B.

ls -ld /data

C.

stat -f /data

D.

fuser -mk /data

Buy Now
Questions 17

A systems administrator manages multiple Linux servers and needs to set up a reliable and secure way to handle the complexity of managing event records on the OS and application levels. Which of the following should the administrator do?

Options:

A.

Create an automated process to retrieve logs from the server by demand.

B.

Implement a centralized log aggregation solution.

C.

Configure daily automatic backups of logs to remote storage.

D.

Deploy log rotation procedures to manage the records.

Buy Now
Questions 18

In the echo " profile-$num-$name " line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?

Options:

A.

echo " profile-$(num)-$name "

B.

echo ' profile-$num-$name '

C.

echo " profile- ' $num ' -$name "

D.

echo " profile-${num}-$name "

Buy Now
Questions 19

After receiving a monitoring call, an administrator checks the Linux server for processes that have completed execution but have not been removed yet from the process table. Which of the following represents the process state for which the administrator should search?

Options:

A.

Z

B.

S

C.

D

D.

T

Buy Now
Questions 20

Application owners are reporting that their application stops responding after several days of running, and they need to restart it. A Linux administrator obtains the following details from the dmesg command:

invoked oom-killer

Call Trace:

out_of_memory

oom_kill_process

The application owners mentioned that resources to the system have been increased, and the error takes longer to appear. Which of the following best describes the reason the process is being terminated by OOM?

Options:

A.

The CPU type is incompatible with the application.

B.

The kernel has panicked.

C.

The application might have a memory leak.

D.

The swap configuration is not correctly sized.

Buy Now
Questions 21

An administrator must secure an account for a user who is going on extended leave. Which of the following steps should the administrator take? (Choose two)

Options:

A.

Set the user’s files to immutable.

B.

Instruct the user to log in once per week.

C.

Delete the user’s /home folder.

D.

Run the command passwd -l user.

E.

Change the date on the /home folder to that of the expected return date.

F.

Change the user’s shell to /sbin/nologin.

Buy Now
Questions 22

An administrator set up a new user account called " test " . However, the user is unable to change their password. Given the following output:

Which of the following is the most likely cause of this issue?

Options:

A.

The SUID bit is missing on the /bin/passwd file.

B.

The password provided by the user " test " does not meet complexity requirements.

C.

The user " test " already changed the password today.

D.

The password has been disabled for user " test " .

Buy Now
Questions 23

A systems administrator is creating a backup copy of the /home/ directory. Which of the following commands allows the administrator to archive and compress the directory at the same time?

Options:

A.

cpio -o /backups/home.tar.xz /home/

B.

rsync -z /backups/home.tar.xz /home/

C.

tar -cJf /backups/home.tar.xz /home/

D.

dd of=/backups/home.tar.xz if=/home/

Buy Now
Questions 24

An administrator needs to create a new logical volume from sets of provisioned disks. Which of the following shows the correct order of commands the administrator should execute?

Options:

A.

1. pvcreate, 2. vgcreate, 3. lvcreate

B.

1. vgcreate, 2. pvcreate, 3. lvcreate

C.

1. vgcreate, 2. lvcreate, 3. pvcreate

D.

1. lvcreate, 2. pvcreate, 3. vgcreate

Buy Now
Questions 25

Which of the following describes what Ansible is used for in the context of IT infrastructure?

Options:

A.

Database management

B.

Configuration management

C.

Process management

D.

Asset management

Buy Now
Questions 26

A Linux administrator observes low network throughput. The administrator gathers the following output:

$ ip link show eth0

eth0: < BROADCAST,MULTICAST,UP,RUNNING > mtu 9000 ...

$ ping -s 1472 -M do 192.168.10.2

PING 192.168.10.2(192.168.10.2) 1472(1500) bytes of data.

From 10.10.9.72 icmp_seq=1 frag needed and DF set

Which of the following is the cause of the low network throughput?

Options:

A.

Hardware limitations

B.

Driver issue

C.

Duplex configuration issue

D.

MTU mismatch

Buy Now
Questions 27

Users cannot access a server after it has been restarted. At the server console, the administrator runs the following commands;

Which of the following is the cause of the issue?

Options:

A.

The DNS entry does not have a valid IP address.

B.

The SSH service has not been allowed on the firewall.

C.

The server load average is too high.

D.

The wrong protocol is being used to connect to the web server.

Buy Now
Questions 28

Which of the following utilities supports the automation of security compliance and vulnerability management?

Options:

A.

SELinux

B.

Nmap

C.

AIDE

D.

OpenSCAP

Buy Now
Questions 29

Which of the following commands is used to ensure a service starts automatically at boot on a system using systemd?

Options:

A.

systemctl start httpd

B.

systemctl enable httpd

C.

systemctl status httpd

D.

systemctl reload httpd

Buy Now
Questions 30

An administrator attempts to install updates on a Linux system but receives error messages regarding a specific repository. Which of the following commands should the administrator use to verify that the repository is installed and enabled?

Options:

A.

yum repo-pkgs

B.

yum list installed repos

C.

yum reposync available

D.

yum repolist all

Buy Now
Questions 31

Which of the following filesystems contains non-persistent or volatile data?

Options:

A.

/boot

B.

/usr

C.

/proc

D.

/var

Buy Now
Questions 32

A new drive was recently added to a Linux system. Using the environment and tokens provided, complete the following tasks:

• Create an appropriate device label.

• Format and create an ext4 file system on the new partition.

The current working directory is /.

Options:

Buy Now
Questions 33

While hardening a system, an administrator runs a port scan with Nmap, which returned the following output:

Which of the following is the best way to address this security issue?

Options:

A.

Configuring a firewall to block traffic on port 23 on the server

B.

Changing the system administrator ' s password to prevent unauthorized access

C.

Closing port 80 on the network switch to block traffic

D.

Disabling and removing the Telnet service on the server

Buy Now
Questions 34

Which of the following commands is used to display detailed information about block devices on a Linux system?

Options:

A.

lsblk

B.

mount

C.

df

D.

fdisk

Buy Now
Questions 35

Which of the following best describes a use case for playbooks in a Linux system?

Options:

A.

To provide a set of tasks and configurations to deploy an application

B.

To provide the instructions for implementing version control on a repository

C.

To provide the security information required for a container

D.

To provide the storage volume information required for a pod

Buy Now
Questions 36

A Linux administrator tries to install Ansible in a Linux environment. One of the steps is to change the owner and the group of the directory /opt/Ansible and its contents. Which of the following commands will accomplish this task?

Options:

A.

groupmod -g Ansible -n /opt/Ansible

B.

chown -R Ansible:Ansible /opt/Ansible

C.

usermod -aG Ansible /opt/Ansible

D.

chmod -c /opt/Ansible

Buy Now
Questions 37

An administrator is trying to terminate a process that is not responding. Which of the following commands should the administrator use in order to force the termination of the process?

Options:

A.

kill PID

B.

kill -1 PID

C.

kill -9 PID

D.

kill -15 PID

Buy Now
Questions 38

A systems administrator needs to integrate a new storage array into the company ' s existing storage pool. The administrator wants to ensure that the server is able to detect the new storage array. Which of the following commands should the administrator use to ensure that the new storage array is presented to the systems?

Options:

A.

lsscsi

B.

lsusb

C.

lsipc

D.

lshw

Buy Now
Questions 39

A Linux user needs to download the latest Debian image from a Docker repository. Which of the following commands makes this task possible?

Options:

A.

docker image init debian

B.

docker image pull debian

C.

docker image import debian

D.

docker image save debian

Buy Now
Questions 40

Which of the following passwords is the most complex?

Options:

A.

H3sa1dt01d

B.

he$@ID$heTold

C.

H3s@1dSh3t0|d

D.

HeSaidShetold

Buy Now
Questions 41

Which of the following cryptographic functions ensures a hard drive is encrypted when not in use?

Options:

A.

GPG

B.

LUKS

C.

PKI certificates

D.

OpenSSL

Buy Now
Questions 42

A systems administrator attempts to edit a file as root, but receives the following error:

Which of the following commands allows the administrator to edit the file?

Options:

A.

chown root /etc/resolv.conf

B.

chattr -i /etc/resolv.conf

C.

chmod 750 /etc/resolv.conf

D.

chgrp root /etc/resolv.conf

Buy Now
Questions 43

Which of the following is the first step when starting a new Python project on a Linux system?

Options:

A.

python -m venv /path/to/project

B.

python -m pip install -r /path/to/project

C.

export PYTHON_PATH=/path/to/project

D.

python -m source /path/to/project

Buy Now
Questions 44

Users report that a Linux system is unresponsive and simple commands take too long to complete. The Linux administrator logs in to the system and sees the following: Output 1:

10:06:29 up 235 day, 19:23, 2 users, load average: 8.71, 8.24, 7.71

Which of the following is the system experiencing?

Options:

A.

High latency

B.

High uptime

C.

High CPU load

D.

High I/O wait times

Buy Now
Exam Code: XK0-006
Exam Name: CompTIA Linux+ V8 Exam
Last Update: May 17, 2026
Questions: 149
XK0-006 pdf

XK0-006 PDF

$25.5  $84.99
XK0-006 Engine

XK0-006 Testing Engine

$30  $99.99
XK0-006 PDF + Engine

XK0-006 PDF + Testing Engine

$40.5  $134.99