Pre-Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

XK0-006 CompTIA Linux+ V8 Exam Questions and Answers

Questions 4

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 5

An administrator wants to start an Ubuntu terminal in a container. Which of the following will allow the administrator to complete the task?

Options:

A.

podman pull ubuntu /bin/bash

B.

docker run -it ubuntu

C.

containerd /usr/bin/sh ubuntu

D.

runc exec -it ubuntu

Buy Now
Questions 6

A systems administrator is having issues with a third-party API endpoint. The administrator receives the following output:

XK0-006 Question 6

Which of the following actions should the administrator take to resolve the issue?

Options:

A.

Open a secure port in the server ' s firewall.

B.

Request a new API endpoint from a third party.

C.

Review and fix the DNS client configuration file.

D.

Enable internet connectivity on the host.

Buy Now
Questions 7

The security manager at a company notifies a systems administrator of open vulnerabilities on the Linux system. The administrator receives the following information while logged in to the server:

$ date

Thu Jul 11 16:12:42 UTC 2024

$ getenforce

Enforcing

$ dnf history

ID | Command Line | Date and time | Action(s) | Altered

45 | update -y | 2023-07-09 | Update | 27

46 | install httpd | 2023-01-11 | Install | 9

47 | update -y | 2023-08-08 | Upgrade | 44

Which of the following is the most likely security concern?

Options:

A.

The server has not been updated in a year and should be patched.

B.

The system has httpd installed and needs to be removed.

C.

The system is configured to use UTC time and should be set to EDT.

D.

The system has SELinux set to enforcing and needs to be disabled.

Buy Now
Questions 8

Which of the following commands should a Linux administrator use to determine the version of a kernel module?

Options:

A.

modprobe bluetooth

B.

lsmod bluetooth

C.

depmod bluetooth

D.

modinfo bluetooth

Buy Now
Questions 9

A systems administrator needs to set the IP address of a new DNS server. Which of the following files should the administrator modify to complete this task?

Options:

A.

/etc/whois.conf

B.

/etc/resolv.conf

C.

/etc/nsswitch.conf

D.

/etc/dnsmasq.conf

Buy Now
Questions 10

A user states that an NFS share Is reporting random disconnections. The systems administrator obtains the following information

XK0-006 Question 10

Which of the following best explains the symptoms that are being reported?

Options:

A.

The mount point is incorrect for the NFS share.

B.

The IP address of the NFS share is incorrect.

C.

The filesystem is nearly full and is reporting errors.

D.

The interface is reporting a high number of errors and dropped packets.

Buy Now
Questions 11

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 12

Which of the following does dmesg display?

Options:

A.

Incorrect login attempts

B.

" Session closed " messages

C.

Window manager warnings

D.

USB device connections

Buy Now
Questions 13

An administrator receives a report that a user is unable to execute the runreports utility. The administrator logs in as the user, runs the following commands, and receives the following output:

$ runreports

runreports: command not found

$ ls -l /usr/local/bin

-rwxr-xr-x 1 root root 29 May 10 11:31 runreports

$ echo $PATH

/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Which of the following best describes the issue and how to resolve it?

Options:

A.

The runreports utility is not in the user ' s path. The administrator should modify the .bash_profile file.

B.

The runreports utility is a shell script but not owned by the user. The administrator should use chown.

C.

The user does not have the correct SELinux context. The administrator should modify the SELinux template.

D.

The runreports utility does not have execute permissions. The administrator should add execute permissions.

Buy Now
Questions 14

A Linux administrator needs to create accounts for a list of new users. The user account names have been defined in the USER_LIST variable as follows:

USER_LIST= " alice bob charles "

Which of the following commands should the administrator use to successfully create the user accounts?

Options:

A.

echo " $USER_LIST " | while username; do useradd -m " $username " ; done

B.

echo " $USER_LIST " | until username; do useradd -m " $username " ; done

C.

select username in " $USER_LIST " ; do useradd -m " $username " ; done

D.

for username in $USER_LIST; do useradd -m " $username " ; done

Buy Now
Questions 15

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 16

A systems administrator is restoring data from a backup. While analyzing the file format, the administrator sees the following output:

data: 7-zip archive data, version 0.4

Which of the following commands should the administrator use to help extract the data?

Options:

A.

7za e data

B.

tar x --lzip --format=v7 data

C.

unzip -p 7 data

D.

zcat -S 7 data

Buy Now
Questions 17

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 18

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 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

A Linux administrator is making changes to local files that are part of a Git repository. The administrator needs to retrieve changes from the remote Git repository. Which of the following commands should the administrator use to save the local modifications for later review?

Options:

A.

git stash

B.

git pull

C.

git merge

D.

git fetch

Buy Now
Questions 21

Which of the following is a reason multiple password changes on the same day are not allowed?

Options:

A.

To avoid brute-forced password attacks by making them too long to perform

B.

To increase password complexity and the system ' s security

C.

To stop users from circulating through the password history to return to the originally used password

D.

To enforce using multifactor authentication with stronger encryption algorithms instead of passwords

Buy Now
Questions 22

A Linux administrator receives reports about MySQL service availability issues. The administrator observes the following information:

uptime -p shows the system has been up for only 2 minutes

journalctl shows messages indicating:

mysqld invoked oom-killer

mysqld cpuset=/ mems_allowed=0

Which of the following explains why the server was offline?

Options:

A.

The process exhausted server memory.

B.

The process was intentionally terminated by a privileged user.

C.

The process crashed because of a filesystem error.

D.

A network outage caused a service availability issue.

Buy Now
Questions 23

A Linux administrator attempts to log in to a server over SSH as root and receives the following error message: Permission denied, please try again. The administrator is able to log in to the console of the server directly with root and confirms the password is correct. The administrator reviews the configuration of the SSH service and gets the following output:

XK0-006 Question 23

Based on the above output, which of the following will most likely allow the administrator to log in over SSH to the server?

Options:

A.

Log out other user sessions because only one is allowed at a time.

B.

Enable PAM and configure the SSH module.

C.

Modify the SSH port to use 2222.

D.

Use a key to log in as root over SSH.

Buy Now
Questions 24

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 25

Which of the following can be implemented with PAM to detect and block dictionary attacks?

Options:

A.

pam_tally2

B.

pam_limits

C.

pam_unix

D.

pam_ldap

Buy Now
Questions 26

A Linux system displays the following error during operation:

Kernel panic - not syncing: Fatal Machine check

Pid: 0, comm: swapper Tainted: G M

Call Trace:

...

mce_panic

do_machine_check

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

Options:

A.

Filesystem corruption

B.

Hardware failure (CPU or memory)

C.

Misconfigured bootloader

D.

Incorrect file permissions

Buy Now
Questions 27

A Linux administrator needs to add a new HTTP service on the server. Which of the following commands allows other systems to communicate with the service after the system is restarted?

Options:

A.

firewall-cmd --add-service=http --reload

B.

firewall-cmd --add-port=http --complete-reload

C.

firewall-cmd --add-service=http --permanent

D.

firewall-cmd --add-service=http

Buy Now
Questions 28

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

XK0-006 Question 28

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 29

A systems administrator is preparing a Linux system for application setup. The administrator needs to create an environment variable with a persistent value in one of the user accounts. Which of the following commands should the administrator use for this task?

Options:

A.

export " VAR=SomeValue " > > ~/.ssh/profile

B.

export VAR=value

C.

VAR=value

D.

echo " export VAR=value " > > ~/.bashrc

Buy Now
Questions 30

Which of the following Ansible components is used to define groups and individual hosts and can include variables specific to each host or group?

Options:

A.

Modules

B.

Inventory

C.

Playbooks

D.

Handlers

Buy Now
Questions 31

An administrator receives the following output while attempting to unmount a filesystem:

umount /data1: target is busy.

Which of the following commands should the administrator run next to determine why the filesystem is busy?

Options:

A.

ps -f /data1

B.

du -sh /data1

C.

top -d /data1

D.

lsof | grep /data1

Buy Now
Questions 32

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 33

User1 reports " access denied " errors while trying to execute app. Given the following outputs:

XK0-006 Question 33

Which of the following options will remediate this issue?

Options:

A.

Providing execute permissions to user1 in the ACL

B.

Modifying the permissions for others to grant read, write, and execute

C.

Adding user1 to the wheel group

D.

Moving app to a different folder

Buy Now
Questions 34

Following the completion of monthly server patching, a Linux administrator receives reports that a critical application is not functioning. Which of the following commands should help the administrator determine which packages were installed?

Options:

A.

dnf history

B.

dnf list

C.

dnf info

D.

dnf search

Buy Now
Questions 35

A Linux administrator needs to analyze a compromised disk for traces of malware. To complete the analysis, the administrator wants to make an exact, block-level copy of the disk. Which of the following commands accomplishes this task?

Options:

A.

cp -rp /dev/sdc/* /tmp/image

B.

cpio -i /dev/sdc -ov /tmp/image

C.

tar cvzf /tmp/image /dev/sdc

D.

dd if=/dev/sdc of=/tmp/image bs=8192

Buy Now
Questions 36

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 37

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 38

An administrator needs to verify the user ID, home directory, and assigned shell for the user named " accounting. " Which of the following commands should the administrator use to retrieve this information?

Options:

A.

getent passwd accounting

B.

id accounting

C.

grep accounting /etc/shadow

D.

who accounting

Buy Now
Questions 39

A Linux administrator wants to use AI to deploy infrastructure as code. Which of the following is a best practice regarding the use of AI for this task?

Options:

A.

Using copy and paste when possible

B.

Generating monolithic code

C.

Linting generated code

D.

Merging CI/CD pipelines

Buy Now
Questions 40

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 41

A Linux administrator needs to compare two files and provide the output in the following format:

2,3d1

< Line 2

< Line 3

4a3

Line 5

Which of the following commands should the administrator use to perform the task?

Options:

A.

comm

B.

awk

C.

file

D.

diff

Buy Now
Questions 42

Due to application compatibility issues, the Python 3 OpenSSL library should not be upgraded. Which of the following commands should the systems administrator use to ensure the package stays at the current version?

Options:

A.

dpkg --hold python3-openssl

B.

apt set-selections python3-openssl

C.

apt-mark hold python3-openssl

D.

echo " python3-openssl hold " | apt set-selections

Buy Now
Questions 43

Which of the following describes the method of consolidating system events to a single location?

Options:

A.

Log aggregation

B.

Health checks

C.

Webhooks

D.

Threshold monitoring

Buy Now
Questions 44

A systems administrator needs to check the statuses of all the services on a Linux server. Which of the following commands accomplishes this task?

Options:

A.

systemctl is-active --services

B.

systemctl list-sockets --type=services

C.

systemctl is-enabled --services

D.

systemctl list-units --type=services

Buy Now
Exam Code: XK0-006
Exam Name: CompTIA Linux+ V8 Exam
Last Update: Apr 27, 2026
Questions: 149

PDF + Testing Engine

$63.52  $181.49

Testing Engine

$50.57  $144.49
buy now XK0-006 testing engine

PDF (Q&A)

$43.57  $124.49
buy now XK0-006 pdf