CompTIA certification practice

Free XK0-005 Practice Test

10 free XK0-005 exam-style questions for CompTIA Linux+ (XK0-005), with answers, explanations and source references.

Last updated

Full set: 487 questions

XK0-005 is the exam for CompTIA Linux+, aimed at people who administer Linux servers. There are no formal prerequisites, but CompTIA recommends 12 months of hands-on experience with Linux servers, plus knowledge at the level of CompTIA A+, Network+, Server+ or similar. CompTIA's current Linux+ page lists the newer V8 exam, XK0-006, launched July 15, 2025, so confirm which version you are preparing for before you book.

The XK0-005 objectives are split into four domains. System Management carries the most weight at 32%, and Troubleshooting follows at 28%, so together they make up 60% of the exam. Security accounts for 21%, and Scripting, Containers, and Automation covers the remaining 19%. A study plan that follows these weights gives the most time to administering and diagnosing Linux systems, while still covering security and the scripting and container work that automates routine tasks.

Work through the free practice questions one at a time and check each answer before moving on. Read every explanation, including those for questions you answered correctly, because the reasoning shows why the other options do not fit. Note the domain behind each miss, then return to that material before your next attempt.

A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a secure shell server and ensure the originating IP address receives a response that a firewall is blocking the connection. Which of the following commands can be used to accomplish this task?
Answer options
A systems administrator identifies multiple processes in a zombie state. Which of the following signals would be best for the administrator to send to the PPID?
Answer options

An administrator made a change to a system's network configuration. Which of the following best represents what the administrator should do to have the new configuration take effect?

Answer options
Which of the following can reduce the attack surface area in relation to Linux hardening?
Answer options
A Linux administrator needs to check extended permissions applied to the directory test. Which of the following commands should the administrator use to help with this task?
Answer options
A Linux systems administrator is updating code. After completing the update, the administrator wants to publish the updated code without including the configuration files. Which of the following should the administrator use to accomplish this task?
Answer options
An operations engineer is planning to start a container running a PostgreSQL database. The engineer wants the container to start automatically at system startup, mount the /home/db directory as /var/lib/postgresql inside the container, and expose port 5432 to the OS. Which of the following commands should the engineer run to achieve this task?
Answer options

A file called testfile has both uppercase and lowercase letters:

$ cat testfile ABCDEfgH IJKLmnoPQ abcdefgH ijklLMNopq

A Linux administrator is tasked with converting testfile into all uppercase and writing it to a new file with the name uppercase.

Which of the following commands will achieve this task?

Answer options
A systems administrator created a user cron to run a scheduled database backup cronjob on the server at 1 a.m. every day. The following is the cronjob syntax: 0 1 * * * /bin/sh backup.sh The backups, however, are not being created. When checking the crontab file, the administrator sees the following error: /var/spool/cron/crontab/cron: Permission denied Which of the following will permit the cronjob to execute?
Answer options

An administrator is investigating why a Linux workstation is not resolving a website. The output of dig and nslookup shows that IPv4 resolution is working, but IPv6 resolution fails.

The administrator executes: nslookup -querytype=AAAA www.comptia.org Can't find www.comptia.org: No answer The workstation has a static entry in /etc/hosts: 104.18.99.101 www.comptia.org

Which of the following is the most likely cause?

Answer options
Question 1 of 10
Browse CompTIA exams

About the exam

XK0-005 exam at a glance

Key facts for the CompTIA Linux+ (XK0-005) exam, taken from the official exam page.

Exam codeXK0-005
Exam price$369 USD per exam (retail, as of February 1, 2024)
PrerequisitesNo prerequisites; 12 months of hands-on experience with Linux servers recommended, plus CompTIA A+, Network+, Server+ or similar knowledge
Version statusThe current official Linux+ page (comptia.org/en-us/certifications/linux/) lists only Linux+ V8, exam series code XK0-006, launched July 15, 2025, and does not mention XK0-005. No official page found stating the XK0-005 retirement date.

Source: official XK0-005 exam page. Verified . Prices and policies can change, so confirm with the provider before booking.

Exam objectives

What the XK0-005 exam covers

The XK0-005 exam is organized into 4 official domains. Weight shows the share of the exam each domain represents, so spend your study time in proportion.

  1. System Management 32%
  2. Security 21%
  3. Scripting, Containers, and Automation 19%
  4. Troubleshooting 28%

Domains and weights from the official XK0-005 exam outline.

Quick answers

XK0-005 exam FAQ

How much does the XK0-005 exam cost?

The XK0-005 exam costs $369 USD per exam (retail, as of February 1, 2024). Check the official exam page for the price in your country.

Source context

How this practice set is maintained

Maintained by the CertMage content team, this page loads questions from the exam dataset connected to its preparation resource. When an answer includes a supporting reference, it is shown with that answer so you can review the underlying vendor documentation.

Certification objectives, interfaces, and vendor services can change. Verify important details against the provider's current exam guide and documentation before your exam.

Reviewed by CCNP, CCNA 200-301, VCP-DCV, LPIC-3, OCA

Scroll to Top