XK0-006 Services and User Management Practice Question
A Linux administrator is troubleshooting a service that fails to start. The service unit file is located at /etc/systemd/system/myservice.service. The administrator runs 'systemctl status myservice' and sees 'Active: failed (Result: exit-code)'. Which of the following commands will provide the most detailed information about why the service failed?
⚠ Common exam trap
The trap here is assuming that systemctl status or systemctl show provides enough detail, when in fact they only give a summary and the actual error is in the journal.
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
The journalctl -u myservice command retrieves all journal entries for the specified unit, including error messages and exit codes. This is the most detailed source of information for diagnosing why a service failed. Other commands show configuration or summary status but lack the runtime error details needed for troubleshooting.
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 and any drop-in snippets. While useful to verify configuration, it does not show runtime errors or logs. It would not reveal why the service failed to start, only how it is configured.
- ✓
journalctl -u myservice
Why this is correct
The journalctl -u myservice command displays all log messages related to the myservice unit, including standard output and error from the service process. This is the most direct way to see why the service failed, as it shows the exact error messages and exit codes. It provides detailed context from the service's execution.
- ✗
systemctl show myservice
Why it's wrong here
systemctl show myservice displays properties of the unit, such as dependencies and status, but not the actual log output or error messages. It can show the result code but not the underlying cause. It is less detailed than journalctl for troubleshooting failures.
- ✗
systemctl list-units --failed
Why it's wrong here
systemctl list-units --failed lists all failed units but does not provide detailed logs for a specific service. It only shows that the service failed, not why. It is a summary view, not a diagnostic tool for individual service failures.
Go deeper
Related to this question
Learn chapter
Managing Storage and File Systems
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.
Key term
systemd
systemd is a system and service manager for Linux operating systems that initializes and manages processes, services, and system resources after the kernel boots.
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.