Courseiva
easyMultiple ChoiceObjective-mapped

XK0-006 A Linux service fails to start Practice Question

A Linux service fails to start. Which command should the administrator use to examine recent system logs for error messages related to the service?

⚠ Common exam trap

Many exam-takers choose `tail -f /var/log/messages` out of habit from older SysVinit systems, not realizing that systemd-based distributions (which the XK0-005 exam focuses on) use journald as the default logging system, making `journalctl` the correct tool for service-specific log examination.

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 is correct because it displays the systemd journal with the `-x` flag adding explanatory context to log entries and the `-e` flag jumping to the end of the log, showing the most recent messages. This is the standard way to examine recent system logs for error messages related to a failing service in a systemd-based Linux distribution.

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

    Shows recent journal entries with explanations.

  • systemctl list-units

    Why it's wrong here

    Lists units but does not show logs.

  • tail -f /var/log/messages

    Why it's wrong here

    Generic log, may not be systemd-aware.

  • dmesg -T

    Why it's wrong here

    Shows kernel messages, not service-specific logs.

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.