Courseiva
mediumMultiple SelectObjective-mapped

XK0-006 Practice Question: Which THREE are valid methods to view logs in a…

Which THREE are valid methods to view logs in a systemd-based system?

⚠ Common exam trap

Candidates often confuse `systemctl status` (which shows a brief log snippet) with a full log viewing method, or they assume legacy syslog files like `/var/log/messages` are always present and authoritative on systemd-based systems.

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

B is correct because `journalctl` is the primary command for querying the systemd journal, which is the default logging system on systemd-based distributions. It provides structured, binary logs with advanced filtering, and is the direct equivalent of viewing logs via the journal.

Answer analysis

Option-by-option breakdown

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

  • cat /var/log/messages

    Why it's wrong here

    This is a traditional syslog file, not directly part of systemd journal.

  • journalctl

    Why this is correct

    Displays the systemd journal.

  • journalctl -u sshd

    Why this is correct

    Filters journal logs for the sshd unit.

  • systemctl status sshd

    Why it's wrong here

    Shows recent logs but only a limited amount; not a full view.

  • dmesg

    Why this is correct

    Shows kernel ring buffer messages.

About these practice questions

This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.