Courseiva
System Management →hardMultiple Select

XK0-006 System Management Practice Question

A Linux administrator is troubleshooting a systemd service named 'webapp.service' that fails to start. The administrator runs 'systemctl status webapp.service' and sees that the service is in a failed state. Which TWO commands will provide additional diagnostic information about why the service failed? (Choose two.)

⚠ Common exam trap

Test-takers frequently confuse unit configuration inspection commands with log retrieval commands, and assuming that systemctl show or cat will reveal runtime errors when they only display static unit properties or file contents.

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 webapp.service

To diagnose why a systemd service failed, administrators need access to logs and error messages. journalctl -u webapp.service filters the journal for that unit, showing its output and systemd's messages. journalctl -xe shows recent system-wide errors with explanations, which often include the service failure. Commands like systemctl cat, show, and list-dependencies are for configuration and dependency inspection, not runtime diagnostics.

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 webapp.service

    Why this is correct

    journalctl -u webapp.service displays all journal entries associated with that specific unit, including stdout/stderr from the service and systemd messages about its start attempts. This is a primary tool for diagnosing service failures, as it shows the exact error output and exit codes. It directly addresses the need for additional diagnostic information beyond the basic status output.

  • ✓

    journalctl -xe

    Why this is correct

    journalctl -xe displays recent journal entries with explanatory notes and jumps to the end, highlighting recent errors and warnings across the system. When a service fails, related error messages from systemd and the service often appear here, providing context. It is a quick way to see recent failures, including those of webapp.service, and is commonly used for troubleshooting.

  • ✗

    systemctl show webapp.service

    Why it's wrong here

    systemctl show webapp.service displays properties of the unit, such as dependencies, environment, and resource limits, but it does not include log output or error messages from the service's execution. It is useful for inspecting unit settings but does not provide the diagnostic detail needed to understand a runtime failure. It is not a primary troubleshooting command for service start issues.

  • ✗

    systemctl cat webapp.service

    Why it's wrong here

    systemctl cat webapp.service shows the contents of the unit file and any drop-in overrides, which is useful for verifying configuration but does not provide runtime diagnostic information about why the service failed. It does not show logs or error messages from the service's execution. While helpful for configuration review, it does not directly reveal the cause of the failure.

  • ✗

    systemctl list-dependencies webapp.service

    Why it's wrong here

    systemctl list-dependencies webapp.service shows the unit's dependency tree, which can help identify missing or failed dependencies, but it does not show logs or error messages from the service itself. While dependency issues can cause failures, this command alone does not provide the specific diagnostic information about why the service failed. It is more of a structural inspection tool.

About these practice questions

One of 781 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 →

How Courseiva writes practice questions · Editorial policy

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.