CompTIA Linux+ (XK0-005) practice test

CompTIA Linux+ (XK0-005) practice test students taking an online exam with rationales and sample questions

Full practice bank

One-time payment · No subscription

  • Detailed rationales
  • Timed practice
  • Self-paced study
  • Open in My Exams
Visual Study StudioNotes and sketches as you practice
Provider
CompTIA
Format
250 questions / 120 min
Preview
20 questions
Full bank
250 practice questions

Free practice

20 sample questions with answer explanations

Interactive Practice Test

CompTIA Linux+ (XK0-005)

20 questions on this page 70% passing score 250 question bank
Practice mode Choose how you want to work through this set.

Exam mode keeps the timer running and shows review after submit. Study mode pauses the timer and lets you check each answer as you go.

Question progress Question 1 of 20
Timer
--:--

Autosaves until submit.

Done 0
Left 20
Question map Timer --:--

Question 1 System management

Question 1: System management

Which command displays the absolute path of the current working directory in a Linux shell?

Question 2 Security

Question 2: Security

A file shows permissions of rwxr-xr– when listed. Which numeric mode represents these permissions?

Question 3 System management

Question 3: System management

Which command is used to change the ownership of a file to a different user and group?

Question 4 Scripting

Question 4: Scripting

In a bash script, which variable contains the number of positional arguments passed to the script?

Question 5 Troubleshooting

Question 5: Troubleshooting

A disk is full and an administrator wants to find which directories are consuming the most space under /var. Which command is most appropriate?

Question 6 System management

Question 6: System management

Which systemd command would an administrator use to enable a service so it starts automatically at boot?

Question 7 Security

Question 7: Security

Which file stores the encrypted password hashes for local user accounts on a modern Linux system?

Question 8 Automation

Question 8: Automation

Which crontab entry runs a backup script every day at 2:30 in the morning?

Question 9 Networking

Question 9: Networking

Which command displays the current IP addresses assigned to all network interfaces on a modern Linux distribution?

Question 10 System management

Question 10: System management

An administrator needs to view the last 20 lines of a log file and continue watching it as new lines are appended. Which command does this?

Question 11 Scripting

Question 11: Scripting

In a bash script, which construct correctly tests whether a variable named COUNT is greater than 10?

Question 12 System management

Question 12: System management

Which command is used to mount a filesystem at a specified directory in the Linux directory tree?

Question 13 Security

Question 13: Security

Which command allows a permitted user to run a single command with elevated privileges while logging the action?

Question 14 Troubleshooting

Question 14: Troubleshooting

An administrator suspects a process is consuming excessive CPU. Which command provides a real-time, continuously updated view of processes sorted by resource usage?

Question 15 Networking

Question 15: Networking

Which command tests whether a remote host responds to ICMP echo requests?

Question 16 System management

Question 16: System management

Which package manager command installs a package and its dependencies on a Debian or Ubuntu based system?

Question 17 Scripting

Question 17: Scripting

Which redirection operator appends the standard output of a command to the end of an existing file without overwriting it?

Question 18 Automation

Question 18: Automation

An administrator wants to apply a consistent configuration across many Linux servers using a declarative, agentless tool. Which tool is well suited for this?

Question 19 Troubleshooting

Question 19: Troubleshooting

A user reports they cannot write to a directory even though it exists. The administrator confirms the directory permissions are 555. What is the most likely cause?

Question 20 System management

Question 20: System management

Which command creates a compressed archive named backup.tar.gz from a directory called data?

Question 1 of 20

How to study for CompTIA Linux+ (XK0-005)

Topics to review from the official outline

  • System management
  • Security
  • Scripting, containers and automation
  • Troubleshooting

Try this in your next study session

Read a Linux scenario and identify whether the symptom appears in storage, permissions, services, or network configuration. Use these XK0-005 objectives for this version and confirm the exam code you intend to take.

Official reference: CompTIA Linux+ XK0-005 exam objectives

About this practice test

What this 2026-2027 CompTIA Linux+ (XK0-005) Practice Test covers

Purchase access to the current 250-question practice bank, with exam mode, study mode, answers and rationales. The free sample is separate. Purchase includes the current bank only.

Practice material can include variations on the same concept. It is not an official exam or a guarantee of a passing score. Confirm important facts against current authoritative sources.

Work through a 250-question independent bank aligned to the XK0-005 domain weights.
Practice system management, security, automation, containers, and troubleshooting.
Use four choice-specific explanations per question to understand the correct answer and each distractor.
Study with saved responses, end-of-practice review, and a separate 20-question free sample.

250 original independent CompTIA Linux+ XK0-005 practice questions aligned to the published retired XK0-005 domain weights and explicitly not relabeled as XK0-006 preparation: System Management 32 percent, Security 21 percent, Scripting, Containers, and Automation 19 percent, and Troubleshooting 28 percent. Every question includes four choice-specific explanations, saved responses, end-of-practice review, and a separate 20-question free sample. The official exam uses a maximum of 90 multiple-choice and performance-based questions in 90 minutes. This expanded 250-question bank uses single-choice practice scenarios and is not an official item count or test form. Access is isolated to product 30637. CompTIA does not sponsor or endorse this bank, and it contains no official, secure, recalled, copied, reconstructed, or proprietary item, credential promise, employment promise, or passing guarantee.

Frequently asked questions

What does this purchase include?

Purchase access to the current 250-question practice bank, with exam mode, study mode, answers and rationales. The free sample is separate. Purchase includes the current bank only.

How do I access my purchase?

After successful payment, sign in with your checkout account and open the exam from your account. You can use exam mode and study mode with answer rationales.

Question-linked study articles

Study articles that support CompTIA Linux+ (XK0-005) prep

An IT operations team at work in a data center

Question topic: Documentation

CompTIA Linux+ (XK0-005) Review: Documentation

July 16, 2026 2 min read

Review documentation for this CompTIA Linux+ (XK0-005) question with the key prompt clue, correct-answer reasoning, distractor checks, and sources to verify next.

A repair technician examining the inside of a desktop computer

Question topic: Study strategy

CompTIA Linux+ (XK0-005) Review: Study strategy

July 16, 2026 2 min read

Review study strategy for this CompTIA Linux+ (XK0-005) question with the key prompt clue, correct-answer reasoning, distractor checks, and sources to verify next.

A repair technician examining the inside of a desktop computer

Question topic: Troubleshooting

CompTIA Linux+ (XK0-005) Review: Troubleshooting

July 16, 2026 2 min read

Review troubleshooting for this CompTIA Linux+ (XK0-005) question with the key prompt clue, correct-answer reasoning, distractor checks, and sources to verify next.

Skip to exam questions