hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Refer to the exhibit
Exhibit
Output of 'systemctl list-units -t service --state=failed': UNIT LOAD ACTIVE SUB DESCRIPTION httpd.service loaded failed failed The Apache HTTP Server Output of 'journalctl -u httpd.service --no-pager | tail -5': Mar 01 10:23:45 server systemd[1]: Starting The Apache HTTP Server... Mar 01 10:23:45 server httpd[1234]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Mar 01 10:23:45 server systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Mar 01 10:23:45 server systemd[1]: httpd.service: Failed with result 'exit-code'. Mar 01 10:23:45 server systemd[1]: Failed to start The Apache HTTP Server.
Refer to the exhibit. A technician sees that the httpd service has failed. Which command was used to view the detailed error log shown in the exhibit?
⚠ Common exam trap
Many exam-takers confuse `systemctl status httpd` (which shows a brief log tail) with `journalctl -u httpd` (which shows the full journal history), leading them to choose A when the exhibit clearly shows a detailed, multi-line error log that only `journalctl` can provide.
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 httpd
The `journalctl -u httpd` command is correct because it queries the systemd journal for logs specifically associated with the `httpd` unit. The exhibit shows a detailed error log with timestamps, process IDs, and error messages, which is exactly the output format of `journalctl` when filtering by a unit. This command provides the most comprehensive view of the service's recent failures, including kernel and application-level errors.
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 status httpd
Why it's wrong here
Shows status, not the detailed log lines shown.
- ✓
journalctl -u httpd
Why this is correct
The output format matches journalctl filtered by service unit.
- ✗
tail -f /var/log/messages
Why it's wrong here
Shows system logs but not filtered to httpd, and format differs.
- ✗
systemctl show httpd
Why it's wrong here
Shows properties like PID, environment, not logs.
Go deeper
Related to this question
Learn chapter
Process Management and System Monitoring
Key term
Output
In IT service management, output is the result or deliverable produced by a process, system, or component, such as data, reports, or services delivered to a customer.
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 979-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 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.