Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

CompTIA XK0-006 Dumps 2026 with Free Practice Questions and Answers

Practise for the CompTIA Linux+ V8 Exam with 10 original questions, each with an answer and explanation.

Topics: System Management, Automation, Orchestration, And Scripting, Services And User Management, Troubleshooting and 1 more.

Includes single answer, multiple answers, drag and drop, dropdown and order list. A new question is added every 15 days.

XK0-006 Practice Set Details

Vendor
CompTIA
Exam Code
XK0-006
Questions On This Page
10
Exam Topics Covered
5 of 5
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
149
Certification
CompTIA Linux+
10 questions

CompTIA XK0-006 Exam Questions and Answers by Topic

System Management

23% of the exam

3 practice questions on this topicWhat this topic covers

Question 1

Added

Order List

A Linux server uses an existing volume group named vgdata with enough free extents for a new logical volume. A new disk has already been installed, but the administrator has not yet prepared it. The requested filesystem must be XFS, mounted persistently at /srv/archive, and available after a normal reboot. The maintenance window permits one planned reboot after configuration is complete. Arrange the steps in the order they must be performed, from preparing the disk through verifying persistent availability.

Drag the steps into the correct order, or use the arrows.

  1. Create a logical volume in vgdata using the new physical volume
  2. Add the filesystem mount to /etc/fstab and verify the entry
  3. Initialize the disk as an LVM physical volume
  4. Create an XFS filesystem on the logical volume
  5. Mount the filesystem and verify it is available
Correct answer:
  1. Create an XFS filesystem on the logical volume
  2. Initialize the disk as an LVM physical volume
  3. Create a logical volume in vgdata using the new physical volume
  4. Add the filesystem mount to /etc/fstab and verify the entry
  5. Mount the filesystem and verify it is available

LVM must recognize the disk as a physical volume before it can allocate extents from it to a logical volume. The logical volume must exist before it can be formatted as XFS. Add the persistent /etc/fstab entry after creating the filesystem, then mount and verify the configured filesystem. Mounting before the filesystem and persistent entry are ready is premature, and adding the mount entry before the filesystem exists makes validation less reliable.

Question 2

Added

Multiple Answers

A cloud operations team must create a compressed archive of /etc and /srv/app for transfer to a recovery environment. The archive must preserve numeric ownership, permissions, and symbolic links, and the receiving system will extract it as root. The archive should be created as a single file at /var/tmp/recovery.tar.gz. There is not enough space to stage an uncompressed tar file, and the team wants to use standard GNU tar behavior. Which TWO command-line properties should the operator use? (Choose two.)

Correct answer: A, D

GNU tar's create mode with gzip compression writes the requested single compressed archive directly, avoiding an uncompressed staging file. The numeric-owner option records numeric user and group IDs, which is useful when extraction occurs on a system with different account-name mappings; tar otherwise stores ownership metadata, and extraction as root can restore it. Dereferencing stores link targets instead of preserving symbolic links. The files-from option expects a file containing a list of paths, not path arguments in that position. Exclusions do not remove ownership and permission metadata.

Question 3

Added

Dropdown

A network administrator is configuring a temporary static IPv4 address on interface enp1s0 with iproute2. The host already has a working default route, and the change must not replace or delete it. Select the correct values for each blank in the command.

Choose the correct value for each blank.

ip address add 192.0.2.25/24 dev enp1s0 && ip link set enp1s0 up
Correct answer:

ip address address add 192.0.2.25/24 dev enp1s0 && ip link link set enp1s0 up

The ip address add form assigns the IPv4 address and prefix to the specified interface, while ip link set ... up brings the interface administratively up. Neither operation changes the existing default route. Using route in the first position would not assign an interface address; using address in the second position would not set the interface's link state. neigh manages neighbor entries and is unrelated to either required operation.

Services and User Management

20% of the exam

2 practice questions on this topicWhat this topic covers

Question 4

Added

Single Answer

A build host runs a systemd service named report-worker.service. An operator made an emergency edit to its unit file under /etc/systemd/system, then restarted the service. The process is running, but systemctl status still displays the previous command in the loaded unit definition. The host cannot be rebooted, and stopping the worker for a short maintenance window is approved. Which action should the operator take so systemd uses the edited unit definition and the worker runs with it?

Correct answer: B

systemd caches unit definitions, so daemon-reload makes it reread changed unit files; restarting the service then starts a process using the updated definition. A service reload generally asks the application to reload its own configuration and does not refresh systemd's unit cache. reset-failed clears failure state but does not reread unit files. daemon-reexec reexecutes the manager and is not the normal required operation for this unit-file change; omitting a restart would also leave the running process unchanged.

Question 5

Added

Drag And Drop

A Linux host runs three container workloads. The operations team wants each workload to have a distinct network exposure model, using the host's available container runtime features rather than manually editing host firewall rules. Match each requirement to the network mode that meets it.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

Containers on the same isolated user-defined network must resolve each other by name
Container must share the host network namespace without port translation
Web container must publish a selected container port through a host port
Host networking
Bridge networking with published ports
User-defined bridge networking
Correct answer:
  • Web container must publish a selected container port through a host port → Bridge networking with published ports
  • Container must share the host network namespace without port translation → Host networking
  • Containers on the same isolated user-defined network must resolve each other by name → User-defined bridge networking

Bridge networking with published ports provides host-to-container port mapping. Host networking places the container in the host network namespace, so it does not use bridge port translation. A user-defined bridge provides network isolation and Docker's embedded name resolution between attached containers. Using host networking for published-port behavior would not provide the requested separation, and the default bridge does not provide the same automatic name-based resolution expected from a user-defined network.

Security

18% of the exam

1 practice question on this topicWhat this topic covers

Question 6

Added

Multiple Answers

A regulated organization allows administrators to connect to production hosts only through SSH public-key authentication. A security review found that local password authentication remains enabled, and administrators can still log in directly as root. The organization uses sudo for audited privilege elevation and must retain console recovery through its existing local break-glass account. No centralized identity or MFA service can be deployed this quarter. Which TWO changes best address the findings without removing console recovery? (Choose two.)

Correct answer: B, C

Disabling root SSH login prevents direct remote root access while preserving sudo-based administration. Disabling SSH password authentication enforces the stated public-key-only remote access policy; the existing local break-glass account remains available at the console. Locking that account jeopardizes the required recovery path and root SSH keys still permit direct root access. Removing sudo reverses the audited privilege model. Disabling PAM for sshd is not an appropriate way to enforce the SSH authentication policy and may disrupt required account and session controls.

Automation, Orchestration, and Scripting

17% of the exam

2 practice questions on this topicWhat this topic covers

Question 7

Added

Single Answer

A team deploys the same application configuration to 40 Linux servers with Ansible. A recent playbook changed a service setting but also restarted the service on every run, causing avoidable interruptions. The service should restart only when its managed configuration file changes, and the playbook must remain safe to rerun. The team cannot introduce a separate deployment tool before the next release. Which change best meets the requirement?

Correct answer: C

Ansible handlers run at the end of a play when notified by a task that reports a change, so the service restarts only when the managed configuration changes. The file task and handler remain idempotent across repeated runs. Setting changed_when to false suppresses change reporting rather than conditionally restarting the service. A checksum shell task that restarts on every run does not meet the requirement and adds unnecessary imperative logic. A provisioning-only condition misses later configuration changes.

Question 8

Added

Single Answer

A Linux engineering team uses Git to maintain a shared repository of deployment scripts. A release must identify the exact commit approved for production, remain easy to check out later, and avoid creating a branch that could continue moving after approval. The team requires the release marker to be visible in normal Git history review and does not want to rewrite shared history. Which approach best meets these requirements?

Correct answer: B

An annotated Git tag names a specific commit without moving as new commits are added, and pushing it makes the release marker available to other users. It is visible in repository history tools and does not rewrite shared history. A release branch can advance and therefore is not an immutable release marker. A local shell variable is neither shared nor recorded in repository metadata. Resetting and force-pushing main rewrites shared history and can disrupt collaborators.

Troubleshooting

22% of the exam

2 practice questions on this topicWhat this topic covers

Question 9

Added

Single Answer

After a storage change, a Linux server reaches emergency mode during boot. The journal reports that mounting /srv/data failed because the UUID configured in /etc/fstab cannot be found. The administrator confirms that the filesystem is healthy and that its current UUID differs from the value in /etc/fstab. The system must return to normal boot with the least change, and the data must remain mounted persistently. Which action is best?

Correct answer: D

The confirmed cause is a stale identifier, so updating the fstab entry to the filesystem's actual UUID restores the intended persistent mount without altering the healthy data. The administrator should validate the edited configuration and confirm the mount succeeds. Reformatting risks data loss and is unnecessary. Removing the entry sacrifices persistent mounting. nofail may allow boot to continue despite the missing device, but it leaves the required data mount unresolved.

Question 10

Added

Single Answer

A production web server has experienced intermittent latency. The load average is high, but CPU utilization is moderate. Monitoring shows that memory is available and the application is not swapping. During an incident, iostat reports sustained high device utilization and long write await times on the filesystem holding the application's transaction log. The application team has not authorized changes to its log format or durability settings, and replacing storage requires a change window. What should the Linux administrator do FIRST to identify the immediate source of the delay?

Correct answer: D

High device utilization and write await point to storage I/O, not CPU scheduling or memory pressure. Identifying which processes are issuing writes with iotop or pidstat -d is a low-risk first diagnostic step before proposing changes to the application or storage. Raising CPU priority cannot relieve a saturated device. Dropping caches does not address sustained writes and can worsen performance. Increasing the file-descriptor limit may help a file-handle exhaustion problem, but none is indicated by the reported storage metrics.

More CompTIA Practice Questions

Get the Full CompTIA XK0-006 Dumps as PDF and Practice Test

10 questions are free on this page and the full set has 149. It comes as a PDF and an online practice test, with 90 days of free updates.