Free · No account needed · No credit card

CompTIA Linux+ XK0-005 Practice Test

510 questions with instant explanations, domain breakdown, and wrong-answer analysis. Built for the real exam.

Instant feedback after each answer
Full explanations included
Domain score breakdown
Real exam: 90 min
Pass mark: 720%

Sample questions with explanations

This is exactly what you see during practice — question, options, and a full explanation after you answer.

Q1Scripting, Containers and Automationmedium
Full explanation →

A DevOps engineer needs to ensure that a containerized web application always restarts automatically if the container exits unexpectedly. Which Docker run option should be used?

A--restart=on-failure
B--restart=unless-stopped
C--restart=no
--restart=alwaysCorrect

The `--restart=always` policy ensures that the container restarts regardless of the exit code or reason for termination, including unexpected crashes. This is the correct choice for a containerized web application that must maintain high availability by automatically recovering f…Read full explanation

Q2Scripting, Containers and Automationeasy
Full explanation →

A system administrator wants to create a new user and set a password in a single command as part of a provisioning script. Which command accomplishes this?

Apasswd user1 password
echo 'user1:password' | chpasswdCorrect
Cuseradd -m -p password user1
Dusermod -p password user1

Option B is correct because the `chpasswd` command reads username:password pairs from standard input, allowing a single command to create or update a user's password. When combined with `echo`, it sets the password for a new or existing user in one line, which is ideal for provis…Read full explanation

Q3Scripting, Containers and Automationhard
Full explanation →

A Linux server that hosts a critical database application has been experiencing occasional kernel panics. The administrator wants to ensure the system automatically reboots after a panic and logs the crash dump. Which sysctl parameter should be set?

Akernel.panic_on_warn = 10
Bkernel.panic_on_oops = 10
Ckernel.panic_print = 10
kernel.panic = 10Correct

Option D is correct because setting `kernel.panic = 10` instructs the Linux kernel to wait 10 seconds after a kernel panic before automatically rebooting. This ensures the system recovers without manual intervention, and combined with a configured crash dump mechanism (e.g., kdum…Read full explanation

Untimed Practice

Answer at your own pace. Explanation and domain tag shown immediately after each answer.

Timed Practice

Countdown timer starts immediately. Results and domain scores shown at the end — just like the real exam.

Why practice here?

Full explanations on every question

Not just the right answer — you get exactly why each wrong option is wrong, so you learn the concept, not the answer.

Domain score breakdown

After each session see your score by exam domain so you know exactly where to focus study time.

100% free, forever

No subscription, no trial, no email wall. Start a session in under 10 seconds.

Exam-style questions

Scenario-based, precise wording, realistic distractors — written to match what you actually see on exam day.

← All XK0-005 questionsXK0-005 exam guideStudy guidePractice by domain