Question 70 of 510
TroubleshootingeasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is `journalctl -xe`. This command is the correct choice because it directly queries the systemd journal, where all service failure reasons—such as exit codes, segmentation faults, or configuration errors—are logged for systemd-managed services like a web server. The `-x` flag adds explanatory context to cryptic log entries, while `-e` jumps to the end of the log, showing the most recent failure details without needing to scroll through hundreds of lines. On the CompTIA Linux+ XK0-005 exam, this question tests your ability to troubleshoot a failed systemd service efficiently, often appearing as a scenario where a service like httpd or nginx won’t start. A common trap is using `systemctl status` alone, which shows the service state but not the full failure reason from the journal. Remember the memory tip: “eXit to the End” for `-xe`—the `-x` explains, and `-e` ends at the latest log entry.

XK0-005 Troubleshooting Practice Question

This XK0-005 practice question tests your understanding of troubleshooting. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

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?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "which command"

    Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

Question 1easymultiple choice
Full question →

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.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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.

    Clue confirmation

    The clue word "which command" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • 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.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that 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.

Trap categories for this question

  • Command / output trap

    Shows status but not full error context.

Detailed technical explanation

How to think about this question

The systemd journal (`journald`) stores structured binary logs with metadata such as priority, PID, and unit name, and `journalctl -xe` decodes this into human-readable output with explanatory hints (e.g., 'Subject: Unit httpd.service has failed'). In real-world scenarios, a service may fail due to a missing configuration file or a port conflict, and `journalctl -u httpd.service -n 50` is often more precise for isolating the unit's logs, but `-xe` is the quickest for a general failure reason.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related XK0-005 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free XK0-005 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this XK0-005 question test?

Troubleshooting — This question tests Troubleshooting — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: 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.

What should I do if I get this XK0-005 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This XK0-005 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-005 exam.