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.

At a glance
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.

XK0-006 cost and format

Exam codeXK0-006
CertificationCompTIA Linux+
VendorCompTIA
LevelAssociate
StatusActive
LanguagesEnglish
ReleasedJuly 15, 2025
RetiresJanuary 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.

All 30 free questions
  1. 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?

    1. Alocate --existing --limit 500 /var/log
    2. Bls -lh /var/log/ | grep -E '100M|1G'
    3. Cdu -ah --threshold=100M -d 1 /var/log
    4. Dfind /var/log -type f -size +100M -mtime -1
    Show answer and explanation
    Correct answer: D

    find 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.

  2. 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?

    1. AThe sticky bit
    2. BThe setgid bit on the file
    3. CExecute permission on the file
    4. DThe setuid bit on the file
    Show answer and explanation
    Correct answer: A

    The 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.

  3. 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?

    1. Aexport PATH=/usr/bin
    2. Bset -x only
    3. Cset -eu
    4. Dchmod +x script.sh
    Show answer and explanation
    Correct answer: C

    set -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.

  4. Question 4Troubleshooting

    A server is slow, and the administrator suspects heavy disk I/O. Which two tools help identify the cause? (Choose two.)

    1. Aip addr show
    2. Bnmcli connection up
    3. Ciotop or pidstat -d to see which processes are doing I/O
    4. Dhostnamectl set-hostname
    5. Eiostat from the sysstat package
    Show answer and explanation
    Correct answer: C, E

    iostat 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.

  5. 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?

    1. Acat -n /etc/fstab
    2. Bdu -shx /* | sort -h
    3. Clsblk -o NAME,SIZE
    4. Dmount -av -t ext4
    Show answer and explanation
    Correct answer: B

    du 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

  1. Read the official CompTIA outline first (exam page), so you know exactly what is in scope.
  2. Give the most time to System Management and Security: together they make up 68% of the questions.
  3. Take the free 30-question practice test and note which topics you miss.
  4. 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.

Full question bank
Coming to the store soon

The full 100-question bank for XK0-006 is in final review. The free practice test is open now.

Start the free practice test

XK0-006 FAQ

Related exams

ExamVendorLevel
FC0-U71: CompTIA Tech+CompTIAFoundational
220-1201: CompTIA A+ Core 1CompTIAFoundational
220-1202: CompTIA A+ Core 2CompTIAFoundational
SK0-005: CompTIA Server+CompTIAAssociate
CAS-005: CompTIA SecurityXCompTIAExpert
CS0-004: CompTIA CySA+ (V4)CompTIAProfessional