CompTIA Linux+ XK0-006 · Practice test

XK0-006 practice exam: CompTIA Linux+ practice test

A timed practice exam in the Linux+ XK0-006 format: flag-for-review, a performance-based task in a real Linux terminal that runs in your browser, and a score from 100 to 900. Questions are in English, like the real exam. Below: what the exam covers, five sample questions with explanations and answers to common questions.

  • 📝 11 questions and tasks
  • ⏱ 15 minutes
  • 📊 Score from 100 to 900
  • 💻 Nothing to install

The questions are in English, like the real exam. The simulator interface and the answer explanations are in Spanish, because the course is taught in Spanish.

What the XK0-006 exam covers

Exam facts published by CompTIA:

ItemDetail
Exam codeXK0-006 (CompTIA Linux+)
QuestionsUp to 90, multiple-choice and performance-based (PBQ)
Time90 minutes
Passing score720 on a scale of 100 to 900
LanguageEnglish

Exam domains and their weight

AreaWeight
System Management23%
Services and User Management20%
Security18%
Automation, Orchestration, and Scripting17%
Troubleshooting22%

XK0-006 sample questions with answers

Original questions written from the public exam objectives, like the ones in the practice exam. Try to answer before opening the explanation.

  1. Question 1 · Services and User Management

    An administrator runs chmod 640 report.txt. Which permissions does the file have now?

    • A. Owner: read and write; group: read; others: none
    • B. Owner: read, write and execute; group: read; others: none
    • C. Owner: read and write; group: read and write; others: none
    • D. Owner: read; group: read and write; others: none
    Show the answer and explanation

    Answer: A. Owner: read and write; group: read; others: none

    Each digit adds read (4), write (2) and execute (1). 6 = 4 + 2 for the owner, 4 = read only for the group and 0 = nothing for others.

  2. Question 2 · System Management

    Which command makes the sshd service start at every boot AND starts it right now?

    • A. systemctl start sshd
    • B. systemctl enable --now sshd
    • C. systemctl restart sshd
    • D. systemctl unmask sshd
    Show the answer and explanation

    Answer: B. systemctl enable --now sshd

    enable sets it to start at boot and --now starts it immediately. start only starts it now, restart restarts it, and unmask removes a mask without enabling the service.

  3. Question 3 · System Management

    The logical volume /dev/data/web is full and the volume group has free space. Which command adds 5 GB to the volume and grows the file system in the same step?

    • A. lvcreate -L 5G -n web data
    • B. lvextend -r -L +5G /dev/data/web
    • C. vgextend data /dev/sdc
    • D. resize2fs /dev/data/web +5G
    Show the answer and explanation

    Answer: B. lvextend -r -L +5G /dev/data/web

    lvextend -L +5G adds 5 GB to the volume and -r resizes the file system at the same time. lvcreate creates a new volume, vgextend adds a disk to the group, and resize2fs does not take a size that way.

  4. Question 4 · Troubleshooting

    df -h shows the / partition at 100%. Which command BEST helps find which directory under /var is using the most space?

    • A. free -h
    • B. du -sh /var/* | sort -h
    • C. lsblk
    • D. fdisk -l
    Show the answer and explanation

    Answer: B. du -sh /var/* | sort -h

    du -sh measures each directory and sort -h orders them by size, largest last. free shows RAM, while lsblk and fdisk show disks and partitions, not what is filling them.

  5. Question 5 · Automation, Orchestration, and Scripting

    In a Bash script, which variable holds the exit status of the last command?

    • A. $?
    • B. $#
    • C. $0
    • D. $!
    Show the answer and explanation

    Answer: A. $?

    $? is 0 when the last command succeeded and non-zero when it failed. $# is the number of arguments, $0 the script name and $! the PID of the last background process.

XK0-006 practice test: frequently asked questions

According to CompTIA, up to 90 multiple-choice and performance-based questions in 90 minutes. The passing score is 720 on a scale of 100 to 900.

No. They are original questions written by HacksinCodigos from the public exam objectives. Real exam questions are confidential: CompTIA's rules prohibit using leaked questions ("dumps" or PDFs that claim to contain the exam), and candidates who do risk having their certification revoked and being banned from future exams. Memorized answers also won't help you with performance-based questions or on the job. Practice with original questions and read the explanation for every answer.

Yes. It runs in a Linux terminal inside your browser, with nothing to install: you type the commands and the simulator checks the resulting system state, not just what you typed.

A good sign is scoring above 800 on full, timed practice exams and solving the performance-based tasks without hints. The per-domain report shows what to review.

Yes. The questions are in English, like the real exam. The simulator interface and the explanations are in Spanish, because the course is taught in Spanish.

Want the full XK0-006 practice exams?

The course includes 3 full practice exams, 16 lessons with hands-on labs and a per-domain report of what to review. It is taught in Spanish, online, and you can take it from any country. US$99, one payment for 12 months of access.

Message us now!