XK0-006 — CompTIA Linux+
CompTIA

CompTIA Linux+ (XK0-006) Practice Questions

★★★★★★ 4.3 154 verified reviews
120 questions
June 12, 2026 updated
✓ Online quiz simulator

Domain coverage

  • System Management (23%)
  • Services and User Management (20%)
  • Security (18%)
  • Automation, Orchestration, and Scripting (17%)
  • Troubleshooting (22%)

Sample Questions (12 of 120 shown)

Q1 System Management
A Linux administrator needs to ensure that a server consistently resolves the hostname 'db-primary' to the IP address 10.50.1.15, regardless of the DNS server's configuration. This change must be persistent and take precedence over any DNS lookups for that specific hostname. Which of the following actions will achieve this goal?
  1. Configure 'search db-primary' in /etc/resolv.conf.
  2. Use the command 'ip route add 10.50.1.15 via [gateway] dev eth0'.
  3. Add 'nameserver 10.50.1.15' to the top of /etc/resolv.conf.
  4. Create an entry '10.50.1.15 db-primary' in the /etc/hosts file.
✓ Correct Answer: D
The /etc/hosts file provides static hostname-to-IP mapping that takes precedence over DNS lookups by default (as configured in /etc/nsswitch.conf with the 'hosts: files dns' order). Adding the entry '10.50.1.15 db-primary' ensures that any query for 'db-primary' resolves to 10.50.1.15 without consulting DNS. The search directive in resolv.conf affects how partial names are resolved, not specific hostname mappings. The ip route command sets routing paths, not name resolution. Adding a nameserver entry specifies which DNS server to query, but does not override DNS responses.
Q2 System Management
To achieve a balance between read performance and single-disk failure tolerance for a database server's data volume, a systems engineer is configuring a software RAID array using four identical disks. Which RAID level is the MOST appropriate choice for this requirement?
  1. RAID 0
  2. RAID 6
  3. RAID 5
  4. RAID 1
✓ Correct Answer: C
RAID 5 uses block-level striping with distributed parity, providing a good balance of read performance (striping allows parallel reads) and single-disk fault tolerance (parity can rebuild the failed disk). With 4 disks, RAID 5 provides (N-1) disks worth of usable capacity. RAID 0 offers no fault tolerance. RAID 6 provides double parity but requires more overhead. RAID 1 (mirroring) provides fault tolerance but at 50% capacity cost and without the read performance benefits of striping across multiple disks.
Q3 System Management
An administrator has installed a new suite of tools in /usr/local/customapp/bin. To ensure these new tools are used instead of any existing system tools with the same names, what command should be run to temporarily alter the command search path for the current session?
  1. export PATH="$PATH:/usr/local/customapp/bin/"
  2. alias customapp='/usr/local/customapp/bin/customapp'
  3. export PATH="/usr/local/customapp/bin:$PATH"
  4. setenv PATH /usr/local/customapp/bin:$PATH
✓ Correct Answer: C
The PATH variable is searched in order from left to right. By prepending /usr/local/customapp/bin to the existing PATH (export PATH="/usr/local/customapp/bin:$PATH"), the shell will find tools in that directory before searching the standard system paths. This ensures the custom tools take precedence over system tools with the same name. Option A appends the directory, which means system tools would still be found first. Option B only works for the named command. Option D uses csh/tcsh syntax, not bash syntax.
Q4 System Management
To permanently change the static IPv4 address of a network connection named 'production' to 192.168.1.100/24 on a system managed by NetworkManager, which command is the most appropriate?
  1. netplan apply --address=192.168.1.100/24 --connection=production
  2. ifconfig production 192.168.1.100 netmask 255.255.255.0
  3. nmcli connection modify production ipv4.addresses 192.168.1.100/24
  4. ip addr add 192.168.1.100/24 dev production
✓ Correct Answer: C
On systems managed by NetworkManager, the nmcli tool is the correct command-line interface for managing connections. nmcli connection modify production ipv4.addresses 192.168.1.100/24 changes the static IP address persistently in the connection profile (stored in /etc/NetworkManager/system-connections/). The ifconfig and ip addr commands make runtime changes only. Netplan applies network configuration on Ubuntu systems but uses a different syntax.
Q5 System Management
Which command is used to display detailed information about block devices on a Linux system?
  1. lsblk
  2. mount
  3. df
  4. fdisk
✓ Correct Answer: A
lsblk (list block devices) displays information about all available block devices (hard drives, SSDs, partitions) in a structured tree format showing device names, sizes, types, and mount points. The mount command shows currently mounted filesystems. df displays disk space usage of mounted filesystems. fdisk is a partition table manipulator with an interactive interface.
Q6 System Management
A Linux administrator is provisioning a new KVM virtual machine named dev-web01 using a command-line utility. The VM requires 2 vCPUs, 2048 MB of RAM, and must be configured to boot from the network (PXE) first. Which of the following commands correctly creates this VM?
  1. virt-install --name dev-web01 --vcpus 2 --memory 2048 --disk size=10 --network bridge:br0 --pxe
  2. virt-builder --name dev-web01 --vcpus 2 --mem 2048 --boot pxe
  3. virsh create dev-web01 --vcpus 2 --ram 2048 --boot network
  4. qemu-system-x86_64 --name dev-web01 --smp 2 --m 2048 --boot n
✓ Correct Answer: A
virt-install is the standard command-line tool for provisioning new KVM virtual machines. The --pxe flag configures the VM to PXE boot from the network during the first boot. virt-builder is used to build disk images, not create running VMs. virsh create requires an existing XML definition file. qemu-system-x86_64 is a low-level emulator, not the standard management tool.
Q7 System Management
A Linux administrator needs to increase the virtual capacity of a qcow2 disk file located at /vms/db01.qcow2 by 50GB. Which command should be executed on the hypervisor to achieve this?
  1. virt-df -h db01 --add 50G
  2. lvextend -L +50G /vms/db01.qcow2
  3. qemu-img resize /vms/db01.qcow2 +50G
  4. virsh blockresize db01 /vms/db01.qcow2 +50G
✓ Correct Answer: C
qemu-img resize is the correct tool to resize virtual disk images. The +50G syntax adds 50GB to the existing capacity. lvextend is for LVM logical volumes, not qcow2 files. virt-df is a disk usage reporting tool. While virsh blockresize exists, qemu-img resize is the standard tool for this operation on the disk image file directly.
Q8 System Management
System users are randomly disconnecting from a server. The system administrator checks the following output: `` # ping 192.168.1.1 --- 192.168.1.1 ping statistics --- 100 packets transmitted, 4 received, 96% packet loss # ip -s link show RX: errors 400000 TX: errors 150000 # ip route default via 192.168.1.1 dev enp0s25 proto dhcp src 192.168.1.102 metric 600 `` Which of the following actions should the administrator take to resolve the issue?
  1. Assign a correct gateway
  2. Replace the NIC
  3. Increase the TTL of the ping
  4. Increase the MTU size
✓ Correct Answer: B
The output shows 96% packet loss and massive error counts on the network interface (RX: 400000 errors, TX: 150000 errors). These extremely high hardware-level error counts strongly indicate a faulty NIC, bad cable, or damaged switch port. The routing table already shows a valid default gateway, so the gateway is correctly assigned. TTL and MTU settings would not cause this level of RX/TX errors. Replacing the NIC is the most direct solution.
Q9 System Management
Enabling btrfs filesystem support requires loading its kernel module. Which command ensures the module and all its dependencies are loaded correctly?
  1. lsmod | grep btrfs
  2. insmod btrfs.ko
  3. depmod -a btrfs
  4. modprobe btrfs
✓ Correct Answer: D
modprobe btrfs is the correct command because it intelligently loads the specified module along with all its dependencies. Unlike insmod, which requires the full path and does not resolve dependencies, modprobe looks up modules in /lib/modules/$(uname -r)/ and handles dependency resolution automatically. lsmod only lists currently loaded modules. depmod generates dependency files but does not load modules.
Q10 System Management
Which of the following filesystems contains non-persistent or volatile data?
  1. /boot
  2. /usr
  3. /proc
  4. /var
✓ Correct Answer: C
The /proc filesystem is a virtual (pseudo) filesystem that exists only in memory and contains runtime kernel and process information. It is dynamically generated by the kernel and does not persist across reboots. /boot contains boot loader files and kernel images (persistent). /usr contains user binaries, libraries, and documentation (persistent). /var contains variable data like logs and databases (persistent storage, though contents change).
Q11 System Management
Which command is used to determine the version of a kernel module?
  1. modprobe bluetooth
  2. lsmod bluetooth
  3. depmod bluetooth
  4. modinfo bluetooth
✓ Correct Answer: D
modinfo displays metadata information about a kernel module, including its version, author, description, license, filename, and dependencies. The version information, if defined by the module developer, is shown in the output. modprobe loads or unloads modules. lsmod lists currently loaded modules. depmod builds module dependency information.
Q12 System Management
An administrator needs to delete a directory /home/user1/data and all of its contents. Which command should the administrator use?
  1. rmdir -p /home/user1/data
  2. ln -d /home/user1/data
  3. rm -r /home/user1/data
  4. cut -d /home/user1/data
✓ Correct Answer: C
The rm -r (recursive) command removes directories and their contents, including all nested files and subdirectories. rmdir -p only removes empty directories. ln -d creates hard links for directories (limited functionality). cut -d is a text processing tool that splits text by a delimiter.

You've viewed 3 of 120 questions. Start the free practice exam to answer all questions with instant feedback.

Exam overview

The CompTIA Linux+ (XK0-006) certification is the only vendor-neutral Linux certification that validates your ability to manage, secure, automate, and troubleshoot Linux systems across cloud and hybrid environments. Unlike vendor-specific Linux certifications (Red Hat, Ubuntu) that focus on a single distribution, Linux+ proves your ability to work with any Linux platform — making you immediately valuable to employers running mixed-distribution infrastructure.

As organizations modernize their infrastructure with cloud-native and hybrid solutions, skilled Linux administrators are in high demand. The V8 exam (launched July 2025) adds critical new content on automation and orchestration (Ansible, Puppet, CI/CD), container management (Docker, Kubernetes), and AI best practices for responsible code generation — skills that directly map to real-world Linux systems administrator and DevOps roles.

Our XK0-006 practice test engine mirrors the actual exam with performance-based questions that simulate real Linux administration scenarios. Every question is tagged to a specific exam domain, you can pinpoint weak areas and focus your study time where it matters most. With coverage of all five domains — from system management to advanced troubleshooting — you'll walk into the testing center fully prepared to pass on your first attempt.

Official Exam Domains & Weighting

To successfully pass the XK0-006 exam, candidates must master Linux administration skills across the following five core domains:
  • Domain 1: System Management (23%)
Identify Linux basics (boot process, kernel, filesystems, architectures), manage devices (kernel modules, hardware components, device utilities), configure storage (LVM, RAID, partitions, mounted storage), set up network configuration (hosts, DNS, interfaces, network tools), use shell operations (navigation, editing, redirection, environment variables), perform backups and restores (archiving, compression, data recovery), and deploy virtualization (hypervisors, VMs, disk images).
  • Domain 2: Services and User Management (20%)
Control files & directories (permissions, links, special files), manage accounts (add, remove, modify users and groups), control processes (monitor states, adjust priorities, schedule jobs), manage software (install, update, remove packages and repositories), manage systems (start, stop, review services, logs, timers), and operate containers (container runtimes, images, networks).
  • Domain 3: Security (18%)
Configure auth & accounting (PAM, LDAP, Kerberos, auditing), set firewalls (iptables, nftables, UFW, zone rules), apply OS hardening (permissions, sudo, secure remote access), enforce account security (password policies, restrict shells, MFA), use cryptography (encrypt files, hashing, manage certificates), and ensure compliance (verify integrity, run scans, maintain standards).
  • Domain 4: Automation, Orchestration, and Scripting (17%)
Automate tasks with Ansible, Puppet, and CI/CD tools, write and troubleshoot shell scripts (variables, functions, logic flows), develop Python scripts (environments, packages, data types), manage version control with Git workflows and tagging, and apply AI best practices (code generation, prompt engineering) responsibly.
  • Domain 5: Troubleshooting (22%)
Monitor system health (logs, event alerts), diagnose hardware/storage issues (boot, mount, repair), resolve networking problems (firewalls, routing, DNS, connectivity), fix security issues (SELinux, permissions, vulnerabilities), and analyze performance (CPU, memory, I/O, optimize response times).

What Our Customers Say 154 verified reviews

4.3 ★★★★★★ Based on 154 reviews
★★★★★★
Amazing resource for XK0-006! The unlimited practice attempts and detailed tracking helped me focus my study time effectively.
— Thomas B.
★★★★★★
Took the XK0-006 exam today and passed with 87%. Used this as my main prep material for about a month.
— Grace L.
★★★★★★
I scored 890 on the XK0-006 exam. Went through about 80% of this question bank and it was more than enough to pass.
— Levi C.
★★★★★★
Between the XK0-006 practice questions and some hands-on labs, I felt fully prepared walking into the exam center.
— Caleb B.
★★★★★★
Had to renew my XK0-006 certification and used this to refresh. Way more efficient than re-reading the official study guide.
— Leo D.
★★★★★★
I was really impressed by the quality of the XK0-006 questions. No typos, no vague wording — they clearly know the material.
— Stella P.

Log in to rate this exam and leave a review.

Submitted for moderation before publishing. Keep it helpful and respectful.

Frequently Asked Questions

Linux+ is vendor-neutral and covers multiple distributions (Ubuntu, Debian, CentOS, RHEL), while RHCSA is Red Hat-specific and more advanced in enterprise scenarios. LPIC is also vendor-neutral but more theoretical. Linux+ includes PBQs that simulate real Linux administration. Our practice tests bridge the gap between theory and practice.

V8 (launched July 2025) adds stronger coverage of automation & orchestration (Ansible, Puppet, CI/CD), container management (Docker, Kubernetes), and AI best practices for responsible code generation. If you're studying for the current exam, make sure your materials are V8-specific — our question bank is fully updated for XK0-006.

CompTIA doesn't publish the exact number, but candidates report 3-5 PBQs alongside multiple-choice questions. PBQs require you to configure, troubleshoot, or analyze in a simulated Linux environment. Our practice engine includes PBQ simulators you won't be surprised on exam day.

Yes, CompTIA supports online proctored exams via Pearson VUE. You'll need a quiet, private space, a webcam, and a stable internet connection. Our practice tests are also web-based, you can study from anywhere and simulate the online exam experience.

Linux+ prepares you for roles including Linux Systems Administrator, Systems Engineer, Network Engineer, DevOps Engineer, and Cloud Engineer. It's also ISO accredited by the ANSI National Accreditation Board. Our customers report an average salary increase of $12,000 after certification.

Most candidates need 8-12 weeks of consistent study (1.5-2 hours/day) with 12+ months of hands-on Linux experience. If you're new to Linux, allow 4-6 months. Our personalized study planner adapts to your schedule and tracks your progress across all five domains.

Linux+ is vendor-neutral and valued by employers who run mixed-distribution environments. RHCSA is Red Hat-specific and more advanced for enterprise scenarios. Many professionals earn Linux+ first to build foundational skills, then specialize with RHCSA or other vendor certs. Our practice tests prepare you for either path.