Pre-Summer Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

XK0-006 CompTIA Linux+ V8 Exam Questions and Answers

Questions 4

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 5

A systems administrator is helping to secure a new web application. During the tests, the administrator obtains the following output to validate the application:

SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384

ALPN, server accepted to use http/1.1

Server certificate:

subject: CN=*.newapp.comptia.org

start date: Jan 17 00:00:00 2024 GMT

expire date: Feb 16 23:59:59 2034 GMT

issuer: C=US; O=Comptia; OU=IT Security; CN=ca1.comptia.org

SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.

Which of the following explains the validation results?

Options:

A.

The certificate was not signed by a trusted authority, which was forcefully ignored during the tests.

B.

The certificate was only issued for one month, is already expired, and needs to be replaced.

C.

The certificate is a wildcard certificate that is highly insecure and should never be used.

D.

The certificate uses an outdated algorithm and should be replaced with a more secure one.

Buy Now
Questions 6

A user reports Issues v/hen trying to connect to one ot the Linux servers. The server administrator reviews the following outputs:

Output 1:

Kernel panic not syncing: Fatal Machine check

Fid: 0, comm; swapper Tainted: G M ------------------ 4.18.0-553.8.1.cl8_10.x86_64 #1

Call Trace:

< #mc > [rrrrrrrrs:4er..i4i] ? panic+ox7n/oxi43

[] ? mcc_panic+0x21f/0x240

[] ? do_machine_check+0xal8/0xae0

[] ? intel idie+0xbi/0xi70

[] ? machino_check+0xlc/0x30

[] ? intel_idle+0xbl/0xl70

«EOE» [] ? hrtimer 8tart+0xlB/0x20

[] ? cpuidle_idle_cail+0xa7/0xl40

I| ? cpu_idle+0xbfc/0xll0

[] ? Start_secondary+0x202/0x245

Output 2:

[325926.243631] mce: [Error] : CPU 22: Machine Check Exception: 7 Bank 0: bd80000000000134

1325926.247004| nice: (Error): Machine check events logged

[325991.358038] race: [Error] : KIP 10: < ffffffff83584719* (copy user enhanced fast strir.q+0x9/0x20)

[325991.358038] mce: [Error] : tsc 31ea89256a735 ADDR 3cdl889000 MISC 8c

[325991.350033] mce: [Error] : PROCESSOR 0:50657 TIME 15945B1695 SOCKET 0 APTC 16 microcode rrrrtrrr

[325991.358038] mce: [Error] : Run the above through ' rr.ccloq —ascii*

[325991.358038] mce: [Error] : Machine check: Action required: unknown MCACOD

[325991.3511038] Kernel panic not syncing: Fatal machine check

Which of the following statements describes the cause and resolution for this issue?

Options:

A.

The current kernel is corrupted and should be reinstalled.

B.

The messages point to a hardware issue that should be addressed by the server team.

C.

The system has crashed and needs to be rebooted to fix the issue.

D.

All available CPUs have been exhausted, and a new CPU should be added.

Buy Now
Questions 7

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 8

Which of the following describes how a user ' s public key is used during SSH authentication?

Options:

A.

The user ' s public key is used to hash the password during SSH authentication.

B.

The user ' s public key is verified against a list of authorized keys. If it is found, the user is allowed to log in.

C.

The user ' s public key is used instead of a password to allow server access.

D.

The user ' s public key is used to encrypt the communication between the client and the server.

Buy Now
Questions 9

A small group of remote users needs permission to run some administrative commands on a Linux server. Which of the following approaches is the best way to address this request?

Options:

A.

Set the sticky bit in all binaries requested for use by this group of users.

B.

Request a list of utilities they need to use with elevated privileges, and add the appropriate rules.

C.

Set the configuration parameter PermitRootLogin on sshd_config to " yes " and share the root password with this group of users.

D.

Create a Linux group, add the users, and configure this group on /etc/sudoers to use sudo, thus allowing them to switch to root user.

Buy Now
Questions 10

Which of the following commands sets all the directories ' permissions recursively in the user ' s home directory and makes them accessible only to the user?

Options:

A.

find / -type f -exec chmod 777 {} ;

B.

find ~ -type d -exec chmod 700 {} ;

C.

find /home -type d -exec chmod 750 {} ;

D.

find $HOME -type d -exec chmod 755 {} ;

Buy Now
Questions 11

A systems administrator receives reports from users who are having issues while trying to modify newly created files in a shared directory. The administrator sees the following outputs:

Which of the following provides the best resolution to this issue?

Options:

A.

Adding a setuid bit to the user in the shared folder

B.

Manually changing the group of the newly created files

C.

Changing all directory contents to be writable and readable for everyone

D.

Adding a setgid bit to the group in the shared folder

Buy Now
Questions 12

Which of the following is the main reason for setting up password expiry policies?

Options:

A.

To avoid using the same passwords repeatedly

B.

To mitigate the use of exposed passwords

C.

To force usage of passwordless authentication

D.

To increase password strength and complexity

Buy Now
Questions 13

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 14

A Linux systems administrator makes updates to systemd-managed service configuration files. Which of the following commands should the administrator execute in order to implement the changes?

Options:

A.

systemctl enable

B.

systemctl start

C.

systemctl restart

D.

systemctl daemon-reload

Buy Now
Questions 15

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:

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 16

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

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 17

An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?

Options:

A.

rmdir -p /home/user1/data

B.

ln -d /home/user1/data

C.

rm -r /home/user1/data

D.

cut -d /home/user1/data

Buy Now
Questions 18

The development team asks a Linux administrator to help diagnose a connectivity issue that is occurring with a newly developed software. The Linux administrator reviews the following output:

$ wget -vvv https://api.newapp.comptia.org/v2/health

Resolving proxy.comptia.org (proxy.comptia.org)... connected.

ERROR: The certificate of ' api.newapp.comptia.org ' is not trusted.

ERROR: The certificate of ' api.newapp.comptia.org ' does not have a known issuer.

Which of the following actions is the best way to resolve the issue?

Options:

A.

Verify the remote certificate is trustworthy, and add it to the local trusted certificates repository.

B.

Replace the remote certificate with a new self-signed CA and application certificate.

C.

Replace the expired CA certificate to permanently resolve the problem.

D.

Add option --no-check-certificate to wget command to permanently resolve the problem.

Buy Now
Questions 19

A systems administrator receives reports about connection issues to a secure web server. Given the following firewall and web server outputs:

Firewall output:

Status: active

To Action From

443/tcp DENY Anywhere

443/tcp (v6) DENY Anywhere (v6)

Web server output:

tcp LISTEN 0 4096 *:443 :

Which of the following commands best resolves this issue?

Options:

A.

ufw disable

B.

ufw allow 80/tcp

C.

ufw delete deny https/tcp

D.

ufw allow 4096/tcp

Buy Now
Questions 20

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

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 21

A systems administrator is reconfiguring existing user accounts in a Linux system. Which of the following commands should the administrator use to include " myuser " in the finance group?

Options:

A.

groupadd finance myuser

B.

groupmod finance myuser

C.

useradd -g finance myuser

D.

usermod -aG finance myuser

Buy Now
Questions 22

Which of the following is the best use of AI within a Linux environment?

Options:

A.

Giving full control of the Linux server to the AI engine

B.

Uploading company internal messaging for user validation

C.

Outsourcing proprietary source code development to the LLM

D.

Generating an nginx configuration file that can be used for testing

Buy Now
Questions 23

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 24

An administrator added a new disk to expand the current storage. Which of the following commands should the administrator run first to add the new disk to the LVM?

Options:

A.

vgextend

B.

lvextend

C.

pvcreate

D.

pvresize

Buy Now
Questions 25

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 26

A systems administrator needs to open the DNS TCP port on a Linux system from network 10.0.0.0/24. Which of the following commands should the administrator use for this task?

Options:

A.

ufw allow dns/tcp to 10.0.0.0/24

B.

ufw enable 53/tcp from 10.0.0.0/24

C.

ufw allow 53/tcp from 10.0.0.0/24

D.

ufw disable from 10.0.0.0/24

Buy Now
Questions 27

A Linux user runs the following command:

nohup ping comptia.com &

Which of the following commands should the user execute to attach the process to the current terminal?

Options:

A.

renice

B.

jobs

C.

exec

D.

fg

Buy Now
Questions 28

A Linux administrator needs to create and then connect to the app-01-image container. Which of the following commands accomplishes this task?

Options:

A.

docker run -it app-01-image

B.

docker start -td app-01-image

C.

docker build -ic app-01-image

D.

docker exec -dc app-01-image

Buy Now
Questions 29

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 30

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 31

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

A systems administrator troubleshoots a connectivity issue and needs to determine whether port 449 is open locally. Which of the following commands should the administrator use?

Options:

A.

ip link 449

B.

dig localhost:449

C.

tracepath localhost 449

D.

ss -an | grep 449

Buy Now
Questions 33

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 34

A systems administrator wants to review the logs from an Apache 2 error.log file in real time and save the information to another file for later review. Which of the following commands should the administrator use?

Options:

A.

tail -f /var/log/apache2/error.log > logfile.txt

B.

tail -f /var/log/apache2/error.log | logfile.txt

C.

tail -f /var/log/apache2/error.log > > logfile.txt

D.

tail -f /var/log/apache2/error.log | tee logfile.txt

Buy Now
Questions 35

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 36

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 37

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 38

A Linux administrator installed a new program inside $HOME/.local/bin and is trying to execute it without using an absolute path. Which of the following should the administrator use for this task?

Options:

A.

export PATH=PATH:$HOME/.local/bin

B.

export $PATH=PATH:$HOME/.local/bin

C.

export PATH=$PATH:$HOME/.local/bin

D.

export $PATH=$PATH:$HOME/.local/bin

Buy Now
Questions 39

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

C.

qemu-io

D.

qemu-img

Buy Now
Questions 40

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 41

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 by executing the following:

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 42

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 43

Which of the following is the location for built-in Linux executable files and utilities?

Options:

A.

/bin

B.

/var

C.

/etc

D.

/sys

Buy Now
Questions 44

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

Linux+ |

Exam Code: XK0-006
Exam Name: CompTIA Linux+ V8 Exam
Last Update: Apr 27, 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