CertGrid
Linux Certification

CompTIA Linux+ (XK0-006) Practice Exam

The current CompTIA Linux+ (V8) exam. Covers system management, services and user management, security, automation/orchestration/scripting, and troubleshooting - including containers, Ansible, and responsible AI use.

Practice 760 exam-style CompTIA Linux+ (XK0-006) questions with full answer explanations, then take timed mock exams that score like the real thing.

760
Practice pool
Max 90 qs
Real exam
90 min
Real exam time
72%
Passing score

CertGrid runs a fixed 90-question timed mock, separate from the real exam format above.

Objective-mapped practice, aligned to current exam objectives · Reviewed Jul 2026 · Independent practice platform.

What the CompTIA Linux+ (XK0-006) exam covers

Free CompTIA Linux+ (XK0-006) sample questions

A sample of 10 questions with answers and explanations. Sign up free to practice all 760.

  1. Question 1System Management

    Which command creates a symbolic link named backup that points to /data/report.txt?

    • Aln /data/report.txt backup
    • Bln -h /data/report.txt backup
    • Clink /data/report.txt backup
    • Dln -s /data/report.txt backupCorrect
    ✓ Correct answer: D

    The -s option tells ln to create a symbolic (soft) link, a small file that stores the pathname of its target. Without -s, ln creates a hard link that shares the target's inode. Symbolic links can cross filesystems and point at directories, unlike hard links.

    Why the other options are wrong
    • AA bare ln with no option creates a hard link, not a symbolic one.
    • B-h does not create a link; it changes how ln treats an existing symlink given as the target.
    • CThe link utility creates only hard links and accepts no symlink option.
  2. Question 2System Management

    Which command creates a RAID 1 array as /dev/md0 from two member disks?

    • Amdadm --create /dev/md0 -l 1 -n 2 /dev/sd[bc]Correct
    • Bmdadm --assemble /dev/md0 -l 1 -n 2 /dev/sd[bc]
    • Cmdadm --build /dev/md0 -l 1 -n 2 /dev/sd[bc]
    • Dmdadm --grow /dev/md0 -l 1 -n 2 /dev/sd[bc]
    ✓ Correct answer: A

    --create builds a new array, with -l 1 selecting RAID level 1 (mirroring) and -n 2 specifying two active devices. The shell glob /dev/sd[bc] expands to the two member disks sdb and sdc.

    Why the other options are wrong
    • B--assemble reactivates an already-created array from its existing members; it does not create one.
    • C--build makes a legacy array without a superblock and is not the standard way to create RAID 1.
    • D--grow reshapes or resizes an existing array rather than creating a new one.
  3. Question 3System Management

    On a UEFI system, which mount point holds the EFI System Partition where the bootloader binaries are stored?

    • A/boot/efiCorrect
    • B/sys/firmware/efi
    • C/boot/grub2
    • D/efi/system
    ✓ Correct answer: A

    On UEFI systems the FAT-formatted EFI System Partition is conventionally mounted at /boot/efi, where the firmware finds the bootloader binaries under EFI/. This is where the distribution's signed bootloader (such as shimx64.efi and grubx64.efi) resides.

    Why the other options are wrong
    • B/sys/firmware/efi exposes EFI runtime variables through sysfs; it is not where bootloader files live.
    • C/boot/grub2 holds GRUB2 modules and grub.cfg, not the EFI System Partition binaries.
    • D/efi/system is not a standard mount point for the ESP.
  4. Question 4Services and User Management

    Which command renames the group 'old' to 'new' while keeping its GID?

    • Agroupmod -g new old
    • Bgroupmod -a new old
    • Cgroupmod -r new old
    • Dgroupmod -n new oldCorrect
    ✓ Correct answer: D

    The -n option changes a group's name while preserving its numeric GID and membership. The syntax is groupmod -n NEW_NAME CURRENT_NAME.

    Why the other options are wrong
    • Agroupmod -g changes the numeric GID, not the name.
    • B-a is not a valid groupmod option.
    • C-r is not a valid groupmod rename option.
  5. Question 5Services and User Management

    Which command deletes a stopped container named web?

    • Apodman rmi web
    • Bpodman rm webCorrect
    • Cpodman kill web
    • Dpodman stop web
    ✓ Correct answer: B

    podman rm removes one or more containers; a stopped container can be deleted directly, while a running one needs -f to force removal. It does not affect images.

    Why the other options are wrong
    • Apodman rmi removes images, not containers.
    • Cpodman kill sends a signal to a running container but does not delete it.
    • Dpodman stop halts a running container yet leaves it defined on disk.
  6. Question 6SecuritySelect all that apply

    Which TWO commands are valid ufw operations? (Choose TWO)

    • Aufw permit 80/tcp
    • Bufw allow 80/tcpCorrect
    • Cufw block 25/tcp
    • Dufw deny 25/tcpCorrect
    • Eufw reject-all
    ✓ Correct answer: B, D

    ufw uses allow to permit traffic and deny to silently block it (reject is also available to send an error). ufw enable activates the firewall and ufw status shows the active rules.

    Why the other options are wrong
    • Aufw has no permit subcommand; use allow.
    • Cufw has no block subcommand; use deny or reject.
    • Ereject-all is not a ufw command; a default deny is set with 'ufw default deny'.
  7. Question 7Security

    Why do browsers display a security warning for a self-signed certificate?

    • AIt is not signed by a trusted CACorrect
    • BIt uses weak symmetric encryption
    • CIts private key is embedded in it
    • DIt cannot encrypt any traffic
    ✓ Correct answer: A

    A self-signed certificate is signed by its own key rather than by a CA in the browser's trust store, so its identity cannot be independently verified. The connection can still be encrypted, but the browser cannot confirm who is on the other end.

    Why the other options are wrong
    • BA self-signed certificate can use the same strong ciphers as a CA-issued one; encryption strength is unrelated to the warning.
    • CA certificate never embeds its private key; that would be a serious compromise.
    • DThe certificate can still establish an encrypted session; the warning is about trust, not encryption capability.
  8. Question 8Automation, Orchestration, and Scripting

    Which command stages a modified file for the next commit?

    • Agit commit
    • Bgit stage-file
    • Cgit push
    • Dgit addCorrect
    ✓ Correct answer: D

    git add <file> copies the file's current changes into the staging area (index), marking them for inclusion in the next commit. Staging lets you choose exactly which changes each commit records.

    Why the other options are wrong
    • Agit commit records already-staged changes; it does not stage files.
    • Bgit stage-file is not a valid Git command.
    • Cgit push uploads commits to a remote; it does not stage files.
  9. Question 9Troubleshooting

    Reading which /proc file directly shows the system's 1-, 5-, and 15-minute load averages?

    • A/proc/stat
    • B/proc/loadavgCorrect
    • C/proc/uptime
    • D/proc/meminfo
    ✓ Correct answer: B

    The /proc/loadavg file contains the three load averages followed by running/total process counts and the last PID. Tools like uptime and top read it to display load. You can cat it directly for a scriptable, dependency-free reading.

    Why the other options are wrong
    • A/proc/stat holds cumulative CPU and kernel counters, not the load averages.
    • C/proc/uptime reports seconds the system has been up and idle, not load.
    • D/proc/meminfo exposes memory statistics, not load averages.
  10. Question 10Troubleshooting

    A script that clearly has its execute bit set still fails with 'Permission denied'. It resides on /tmp, which is mounted with the noexec option. What is the cause?

    • AMissing shebang line
    • BThe noexec mount optionCorrect
    • CWrong file owner
    • DSELinux is disabled
    ✓ Correct answer: B

    A filesystem mounted with noexec forbids executing any binary or script from it regardless of the file's execute bits, producing 'Permission denied'. Moving the script to a filesystem without noexec, or invoking it via its interpreter (bash script.sh), works around it. Checking mount output or /etc/fstab confirms the option.

    Why the other options are wrong
    • AA missing shebang yields an exec-format or interpreter error, not a permission error, and running via an interpreter would still work.
    • CA wrong owner might block access but the scenario states execute bits are set and points to noexec.
    • DSELinux being disabled removes a restriction rather than adding one, so it cannot cause the denial.

Related Linux resources

CompTIA Linux+ (XK0-006) practice exam FAQ

How many questions are in the CompTIA Linux+ (XK0-006) practice exam on CertGrid?

CertGrid has 760 practice questions for CompTIA Linux+ (XK0-006), covering 5 exam domains. The real CompTIA Linux+ (XK0-006) exam is Max 90 qs in 90 min. CertGrid's timed mock is a fixed 90 questions.

What is the passing score for CompTIA Linux+ (XK0-006)?

The CompTIA Linux+ (XK0-006) exam passing score is 72%, and you have about 90 min to complete it. CertGrid scores your practice attempts the same way so you know when you are ready.

Are these official CompTIA Linux+ (XK0-006) exam questions?

No. CertGrid is an independent practice platform. We do not provide real or leaked exam questions. Our questions are original and designed to help you practice the concepts, scenarios, and difficulty style of the CompTIA Linux+ (XK0-006) exam.

Can I practice CompTIA Linux+ (XK0-006) for free?

Yes. You can start practicing CompTIA Linux+ (XK0-006) for free with daily practice and sample questions. Paid plans unlock full timed exams, complete explanations, and domain analytics.

What CertGrid is (and is not)

CertGrid is an independent IT certification practice platform for Azure, AWS, Google, Cisco, Security, Linux, Kubernetes, Terraform, and other certification tracks. It provides objective-mapped practice questions, readiness scoring, weak-domain drills, and explanations to help learners understand what to study next.

Independent & original. CertGrid is an independent practice platform and is not affiliated with or endorsed by Linux. Questions are original practice items designed to mirror certification concepts and exam style. CertGrid does not provide official exam questions or braindumps.