easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A company uses a Linux server running a web…
A company uses a Linux server running a web application. Users report that they cannot access the website. The administrator checks the web server status and finds it is not running. Which command should the administrator use to view the reason for the service failure?
⚠ Common exam trap
A common mix-up: candidates confuse the access log (option C) with the error log, or assume `systemctl status` shows the full failure reason when it only shows a truncated snippet, while `journalctl -xe` is the standard command for detailed failure diagnostics in systemd-based distributions.
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 -xe
The `journalctl -xe` command displays the systemd journal log with the `-x` flag adding explanatory context and `-e` jumping to the end of the log, which is the most direct way to view the reason a systemd-managed service like httpd failed. Since the web server is managed by systemd, its failure reason (e.g., exit code, segfault, configuration error) is recorded in the journal, and this command retrieves that specific failure detail without requiring manual log file parsing.
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 -xe
Why this is correct
Displays recent journal entries with explanations.
- ✗
systemctl status httpd --full
Why it's wrong here
Shows status but not full error context.
- ✗
tail -f /var/log/httpd/access_log
Why it's wrong here
Access log may not contain error details.
- ✗
dmesg | grep httpd
Why it's wrong here
Shows kernel messages, not service logs.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
journalctl
Journalctl is a command-line tool used to view and query logs collected by the systemd journal, which stores system and application messages on Linux systems.
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
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.