XK0-006 Services and User Management Practice Question
A Linux administrator is troubleshooting a service that fails to start at boot. The service unit file is present in `/etc/systemd/system/` and has been enabled. Running `systemctl status myservice` shows it as `inactive (dead)`. Which command should the administrator run to see the most recent boot messages for this service?
⚠ Common exam trap
The trap here is assuming that `systemctl status` or `systemctl show` includes historical boot logs, when they only show current state and properties.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
journalctl -u myservice -b
To see boot-time messages for a specific systemd service, the correct tool is `journalctl` with the `-u` (unit) and `-b` (current boot) options. This filters the journal to show only entries from that unit during the current boot. Other commands either show unit file contents, unit properties, or rely on a non-authoritative log file, and none provide the targeted boot logs needed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
systemctl cat myservice
Why it's wrong here
`systemctl cat myservice` displays the contents of the unit file, which can help verify configuration but does not show runtime logs or boot messages. It is useful for checking for syntax errors, but it does not provide the historical boot messages needed to diagnose a startup failure.
- ✗
grep myservice /var/log/boot.log
Why it's wrong here
`/var/log/boot.log` may contain boot messages on some systems, but it is not the authoritative source for systemd service logs. Systemd logs are stored in the journal, accessible via `journalctl`. This method might miss messages or be incomplete, especially if the service logs to the journal only.
- ✓
journalctl -u myservice -b
Why this is correct
`journalctl -u myservice -b` filters the journal for messages from the specified unit and limits output to the current boot. This shows all log entries for the service since the last boot, which is exactly what the administrator needs to diagnose why the service failed to start at boot.
- ✗
systemctl show myservice
Why it's wrong here
`systemctl show myservice` displays properties of the unit, such as dependencies and execution status, but not log messages. It provides low-level configuration details and current state, but it does not include the boot-time logs that would explain why the service failed to start.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
systemctl
systemctl is the command-line tool used to inspect, start, stop, enable, or disable services managed by the systemd init system in Linux.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.