Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: An administrator runs 'systemctl list-units' and…

Exhibit

Refer to the exhibit.
UNIT                   LOAD   ACTIVE SUB      DESCRIPTION
sshd.service           loaded active running OpenSSH Daemon
httpd.service          loaded failed failed  Apache HTTP Server

An administrator runs 'systemctl list-units' and sees that httpd.service is in a failed state. To quickly see the error message that caused the failure, which command should be used?

⚠ Common exam trap

Many candidates confuse `systemctl status` with `journalctl -u` or `systemctl show`, thinking they need a separate log-viewing command, but `systemctl status` already provides the most recent error output directly, making it the fastest diagnostic tool for a failed service.

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

The `systemctl status httpd.service` command displays the current state of the service, including the most recent log entries from the journal that show the error messages causing the failure. This is the quickest way to see the failure reason without filtering or additional options, as it directly outputs the relevant error lines from the service's unit.

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 show httpd.service -p ExecMainStatus

    Why it's wrong here

    This shows the exit status of the main process, but not the error message or log output.

  • journalctl -p err -u httpd.service

    Why it's wrong here

    This shows only error messages, but systemctl status provides the most relevant output for a quick diagnosis.

  • systemctl status httpd.service

    Why this is correct

    systemctl status shows the unit status along with the last few log entries that led to the failure.

  • systemd-analyze blame

    Why it's wrong here

    This shows service start times and does not help with a failed service.

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 →

How Courseiva writes practice questions · Editorial policy

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.