Courseiva
hardMultiple SelectObjective-mapped

XK0-006 Practice Question: A Linux administrator is troubleshooting a…

A Linux administrator is troubleshooting a service that fails to start. Which THREE files or commands should be checked to diagnose the issue? (Select THREE.)

⚠ Common exam trap

CompTIA often tests the distinction between kernel-level logs (dmesg) and service-level logs (journalctl), and the trap here is that candidates may confuse `dmesg` with service troubleshooting because it shows boot-time messages, but it does not capture service-specific failures.

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 service-name

B is correct because `journalctl -u service-name` displays the systemd journal logs specifically for that service, which includes detailed error messages, timestamps, and status changes that are essential for diagnosing why the service failed to start. This command is the primary tool for viewing service-specific logs in modern systemd-based Linux distributions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • dmesg

    Why it's wrong here

    Kernel ring buffer, not directly related to service failures.

  • journalctl -u service-name

    Why this is correct

    Shows service-specific logs from journald.

  • /var/log/messages (or /var/log/syslog)

    Why this is correct

    General system logs may contain error messages.

  • /etc/rc.local

    Why it's wrong here

    Legacy script, not typically used for service startup.

  • systemctl status service-name

    Why this is correct

    Shows current status and recent log entries.

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.