All CompTIA exams
CompTIA XK0-006: CompTIA Linux+
What the XK0-006 exam covers and what it costs, with a free 30-question practice test and an explanation for every answer.
- Duration
- 90 minutes
- Questions on the exam
- Maximum of 90
- Passing score
- 720 (scale 100-900)
- Level
- Associate
- Topic areas
- 4
- Free practice questions
- 30
- Full question bank
- 100 questions
What the XK0-006 exam covers
The topic areas in our XK0-006 question bank, with each one's share of the 100 practice questions.
| Topic | Share | Questions |
|---|---|---|
| System Management | 37% | 37 |
| Security | 31% | 31 |
| Scripting, Containers, and Automation | 17% | 17 |
| Troubleshooting | 15% | 15 |
XK0-006 cost and format
| Exam code | XK0-006 |
|---|---|
| Certification | CompTIA Linux+ |
| Vendor | CompTIA |
| Level | Associate |
| Status | Active |
| Languages | English |
| Released | July 15, 2025 |
| Retires | January 1, 2028 |
Last checked October 22, 2026 against the official CompTIA exam page.
XK0-006 sample questions
The first 5 questions from the free practice test. Open a question to see the answer and why it is right.
Question 1System Management
A sysadmin needs to find every file under /var/log that is larger than 100 MB and was modified in the last 24 hours. Which command does this?
- Alocate --existing --limit 500 /var/log
- Bls -lh /var/log/ | grep -E '100M|1G'
- Cdu -ah --threshold=100M -d 1 /var/log
- Dfind /var/log -type f -size +100M -mtime -1
Show answer and explanationHide answer
Correct answer: Dfind combines a size test (+100M means larger than 100 MB) with a modification-time test (-mtime -1 means within the last day). ls and du do not filter by both criteria, and locate uses a database that does not check modification time this way.
Question 2Security
A sysadmin notices that a file in a shared directory can be deleted by any user, even though it is owned by another user. Which permission setting is most likely missing from the directory?
- AThe sticky bit
- BThe setgid bit on the file
- CExecute permission on the file
- DThe setuid bit on the file
Show answer and explanationHide answer
Correct answer: AThe sticky bit on a directory restricts deletion so that only the file owner, the directory owner or root can remove files, which is the typical protection for shared directories such as /tmp. The setuid and setgid bits affect execution and group inheritance, and execute permission does not control deletion.
Question 3Scripting, Containers, and Automation
A Bash script must stop at the first failing command and treat use of an unset variable as an error. Which shell options provide this behaviour?
- Aexport PATH=/usr/bin
- Bset -x only
- Cset -eu
- Dchmod +x script.sh
Show answer and explanationHide answer
Correct answer: Cset -e exits when a command fails and set -u treats unset variables as errors, which makes scripts fail fast and predictably. set -x only traces commands, exporting PATH changes the search path, and chmod affects permissions rather than error handling.
Question 4Troubleshooting
A server is slow, and the administrator suspects heavy disk I/O. Which two tools help identify the cause? (Choose two.)
- Aip addr show
- Bnmcli connection up
- Ciotop or pidstat -d to see which processes are doing I/O
- Dhostnamectl set-hostname
- Eiostat from the sysstat package
Show answer and explanationHide answer
Correct answer: C, Eiostat reports device utilization and wait times, and iotop or pidstat -d show per-process I/O, which together locate the source. Address, connection and hostname commands do not measure disk activity.
Question 5System Management
A server's root filesystem is 95 percent full. The administrator wants to see which top-level directories use the most space without crossing into other mounted filesystems. Which command is most suitable?
- Acat -n /etc/fstab
- Bdu -shx /* | sort -h
- Clsblk -o NAME,SIZE
- Dmount -av -t ext4
Show answer and explanationHide answer
Correct answer: Bdu with -x stays on one filesystem, and sort -h orders the human-readable sizes so the largest directories appear last. fstab lists configured mounts, mount -a mounts them, and lsblk shows block devices rather than per-directory usage.
How to prepare for XK0-006
- Read the official CompTIA outline first (exam page), so you know exactly what is in scope.
- Give the most time to System Management and Security: together they make up 68% of the questions.
- Take the free 30-question practice test and note which topics you miss.
- Go back to the weak topics, then test again. A practice score shows where to study; it does not predict your exam result.
Full XK0-006 question bank
All 100 questions with answers and explanations, as a PDF, an online practice exam, or both.
The full 100-question bank for XK0-006 is in final review. The free practice test is open now.
Start the free practice testXK0-006 FAQ
Related exams
| Exam | Vendor | Level |
|---|---|---|
| FC0-U71: CompTIA Tech+ | CompTIA | Foundational |
| 220-1201: CompTIA A+ Core 1 | CompTIA | Foundational |
| 220-1202: CompTIA A+ Core 2 | CompTIA | Foundational |
| SK0-005: CompTIA Server+ | CompTIA | Associate |
| CAS-005: CompTIA SecurityX | CompTIA | Expert |
| CS0-004: CompTIA CySA+ (V4) | CompTIA | Professional |