Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CompTIA Linux Plus XK QA Practice Exam Verified Complete

Rating
-
Sold
-
Pages
37
Grade
A+
Uploaded on
23-03-2026
Written in
2025/2026

CompTIA Linux+ XK — 60 Q&A Practice Exam Verified Answers

Institution
Course

Content preview

CompTIA Linux+ XK0-005 2025 — 60 Q&A Practice Exam
Verified Answers

Series:
CrashCourses Professional Study Series

Author:
Dr Z. Moomba, MBChB, MRCPsych | BethelWellness Ltd

Exam Target:
CompTIA Linux Plus XK0-005

Year:
2025/2026

Format:
60 Questions with Verified Answers and Rationales


>
Author's Note:
This document is an original work produced for the CrashCourses Professional Study Series.
Clinical questions and professional scenarios were composed by Dr Z. Moomba based on current
exam objectives, published guidelines, and evidence-based sources (2024–2025). All patient
names, ages, and case details are fictional. Any resemblance to existing published Q&A banks is
coincidental. For personal study use only — not for reproduction or redistribution.


SECTION A — FOUNDATIONS

Question 1
A bioinformatics system administrator at Royal Hope Hospital needs to ensure a custom DNA
sequencing daemon, `seq-analyzer`, automatically restarts if it crashes due to an out-of-memory
exception. The Linux server utilises `systemd`. Which directive should be added to the `[Service]`
section of the unit file?
A) `Restart=always`
B) `Restart=on-failure`
C) `AutoRestart=true`
D) `Respawn=yes`



,Answer: B

Rationale:
a) The `Restart=on-failure` directive instructs systemd to restart the service only if it exits with a
non-zero exit code or is terminated by a signal.
b) The scenario explicitly notes a crash (out-of-memory exception), which generates a failure
state, making `on-failure` the precise target.
c) `Restart=always` is a tempting wrong answer, but it would also restart the daemon even upon a
clean, intentional manual stop (exit code 0), which is poor practice for maintenance windows.
d) Systemd unit files are the definitive standard for modern Linux daemon management. [CompTIA
XK0-005 Objectives 2025]


Question 2
During a routine audit of the hospital’s Electronic Health Record (EHR) database server, Dr Patel
notices the system is booting into the graphical interface, consuming unnecessary RAM. He
wishes to change the default boot target to the multi-user, non-graphical runlevel equivalent.
Which command achieves this?
A) `systemctl set-default multi-user.target`
B) `systemctl isolate multi-user.target`
C) `grub2-mkconfig -o /boot/grub2/grub.cfg`
D) `telinit 3`

Answer: A

Rationale:
a) `systemctl set-default` establishes a permanent symlink for the default target that systemd uses
upon boot.
b) The administrator requires a permanent change to the default boot behaviour, making `set-
default` necessary.
c) `systemctl isolate` is tempting as it changes the current state immediately, but it does not
survive a reboot.
d) The multi-user.target replaces the legacy SysVinit runlevel 3. [Red Hat Sysadmin Guide 2024]


Question 3





,A patient telemetry server is experiencing sudden kernel panics. The IT clinician needs to review
kernel messages from the previous boot to diagnose the hardware fault. Which command
retrieves this specific data?
A) `dmesg --previous`
B) `journalctl -b -1 -k`
C) `cat /var/log/messages | grep kernel`
D) `journalctl -u kernel.service`

Answer: B

Rationale:
a) `journalctl` interfaces with the systemd-journald service. The `-b -1` flag specifies the previous
boot, and `-k` filters specifically for kernel messages.
b) Reviewing a previous boot requires persistent logging and specific boot indexing (`-b -1`), which
journalctl handles natively.
c) `dmesg` is a tempting wrong answer for viewing kernel ring buffers, but it only displays
messages for the current active boot session.
d) Persistent journal configuration requires the `/var/log/journal` directory to exist or
`Storage=persistent` in `journald.conf`. [NIST 800-92]


Question 4
You are managing scheduled maintenance tasks for the hospital's Picture Archiving and
Communication System (PACS). A script must run every night at 03:00 to purge old temporary
image caches. Which `crontab` entry correctly schedules this job?
A) `0 3 * /opt/pacs/purge.sh`
B) `3 0 * /opt/pacs/purge.sh`
C) ` 3 /opt/pacs/purge.sh`
D) `0 3 1 /opt/pacs/purge.sh`

Answer: A

Rationale:
a) The crontab format is `minute hour day_of_month month day_of_week`. `0 3 *` translates to
minute 0, hour 3 (03:00 AM), every day.
b) The requirement is specifically "every night at 03:00," requiring wildcards for the day/month
fields.



, c) ` 3 ` is tempting, but it would run the script every minute during the 3 AM hour (60 times).
d) Automated tasks running as root should use absolute paths to prevent PATH hijacking. [CIS
Linux Benchmarks 2024]


Question 5
The hospital's central scheduling application has locked up, causing a CPU spike. A technician
uses `top` and identifies the PID as 4402. They wish to gracefully terminate the application to
allow it to close open database connections. Which command is safest?
A) `kill -9 4402`
B) `kill -15 4402`
C) `pkill -f 4402`
D) `killall -SIGKILL 4402`

Answer: B

Rationale:
a) `kill -15` sends the SIGTERM signal, which asks the process to terminate gracefully, allowing it
to close files and network sockets.
b) The clinical imperative is to "allow it to close open database connections," requiring a graceful
exit.
c) `kill -9` (SIGKILL) is tempting for a locked application, but it forcibly destroys the process
without cleanup, risking database corruption.
d) Always attempt SIGTERM (15) before escalating to SIGKILL (9). [CompTIA XK0-005 Objectives
2025]


Question 6
A massive epidemiological data processing job is bogging down the research department's shared
server. You need to lower the CPU priority of the already running process (PID 8820) so
interactive clinical users aren't affected. Which command achieves this?
A) `nice -n 10 8820`
B) `renice +10 -p 8820`
C) `chrt -p 10 8820`
D) `systemctl set-property 8820 CPUWeight=10`

Answer: B

Written for

Institution
Study
Course

Document information

Uploaded on
March 23, 2026
Number of pages
37
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$18.98
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CrashCourses (At Home Study)
Follow You need to be logged in order to follow users or courses
Sold
145
Member since
5 year
Number of followers
49
Documents
664
Last sold
3 months ago
University of the People MBA solutions

University of the People - 100% Correct Solutions

4.7

9 reviews

5
7
4
1
3
1
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions