What the CompTIA Linux+ (XK0-006) exam covers
- System Management175 questions
- Services and User Management152 questions
- Security137 questions
- Automation, Orchestration, and Scripting129 questions
- Troubleshooting167 questions
Free XK0-006 practice test questions
A sample of 10 questions with answers and explanations. Sign up free to practice all 760.
-
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: DThe -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.
-
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.
-
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: AOn 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.
-
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: DThe -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.
-
Which command deletes a stopped container named web?
- Apodman rmi web
- Bpodman rm webCorrect
- Cpodman kill web
- Dpodman stop web
✓ Correct answer: Bpodman 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.
-
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, Dufw 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'.
-
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: AA 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.
-
Which command stages a modified file for the next commit?
- Agit commit
- Bgit stage-file
- Cgit push
- Dgit addCorrect
✓ Correct answer: Dgit 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.
-
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: BThe /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.
-
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: BA 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.
Who this CompTIA Linux+ (XK0-006) practice exam is for
This practice set is for anyone preparing for the CompTIA Linux+ (XK0-006) exam - from first-time candidates building a foundation to experienced Linux practitioners doing a final review before test day. If you learn best by working through realistic questions and reading why each answer is right or wrong, it is built for you.
How to use this CompTIA Linux+ (XK0-006) practice exam
- Start with the free sample questions above to gauge your current baseline.
- Read the full explanation on every question, including why each wrong option is wrong.
- Track your weak domains and focus your study where you are losing the most marks.
- Once you are scoring consistently well, take a timed, full-length mock exam.
- Use your readiness score to decide when you are ready to book the real CompTIA Linux+ (XK0-006) exam.
Related Linux resources
- CompTIA Linux+ (XK0-006) study guideKey concepts
- Linux practice examsAll Linux
- Certification pathWhere this fits
- Certification exam guides & tipsBlog
- Plans & pricingFree & paid
- Hands-on linux-plus labsLearn
- Hands-on lfcs labsLearn
- Hands-on podman labsLearn
- Linux+ XK0-006 command cheat sheetCheat sheet
- LFCS command cheat sheetCheat sheet
- Debian and Red Hat, side by sideCheat sheet
- Docker to Podman translation sheetCheat sheet
- Podman command cheat sheetCheat sheet
- How these questions are written and reviewedMethodology
- Report a problem with a questionCorrections
- Linux Foundation Certified System Administrator (LFCS) practice examRelated
- LPIC-1 practice examRelated
- LPIC-2 practice examRelated
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 720 / 900, 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.
Is there a free XK0-006 practice test?
Yes. You can take a free CompTIA Linux+ (XK0-006) practice test straight away: a fixed set of 20 practice questions for this exam, retryable as often as you like, with no credit card required. You get readiness scoring and a weak-domain breakdown on those questions. Paid plans unlock the full 760-question bank, timed mock exams and full-bank 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 not affiliated with or endorsed by Microsoft, AWS, Google, Cisco, CompTIA, the Linux Foundation, HashiCorp, or other certification vendors. Questions are original practice items designed to mirror certification concepts and exam style. CertGrid does not provide official exam questions or braindumps.