XK0-006 System Management Practice Question
A system administrator is troubleshooting a service that fails to start at boot. The system uses systemd. Which of the following commands would the administrator use to check the service's status and view its recent log entries?
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
✓
systemctl status service && journalctl -n 50
'systemctl status service' displays detailed status of the service, including recent logs. 'journalctl -n 50' shows the last 50 journal entries. Together, they provide both status and recent logs. Option A uses 'systemctl is-active', which only returns active/inactive, not detailed status. Option C lists failed units and error-level logs, not specific to the service. Option D also uses 'systemctl is-active' (boolean) and 'journalctl -n 50' without focusing on the service. Therefore, B is the best choice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
journalctl -u service -n 50 && systemctl is-active service
Why it's wrong here
Reverse order but still, is-active is not as informative as status.
- ✓
systemctl status service && journalctl -n 50
Why this is correct
Correct: status shows service state and recent logs; journalctl -n 50 shows last 50 lines.
- ✗
systemctl list-units --state=failed && journalctl -p err
Why it's wrong here
list-units shows all failed units, not specific service; journalctl -p err shows all errors.
- ✗
systemctl is-active service && journalctl -n 50
Why it's wrong here
systemctl is-active only returns active/inactive, not detailed status or logs.
Go deeper
Related to this question
Learn chapter
Process Management and System Monitoring
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.
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.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.