Courseiva
Service Configuration →easyMultiple Choice

LFCS Service Configuration Practice Question

A system administrator wants to view the current runtime status of the sshd.service, including whether it is active, its main PID, and recent log entries. Which command should they use?

⚠ Common exam trap

The trap here is thinking that journalctl -u sshd.service -f shows the current status, when it only follows logs and does not display the service state.

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

systemctl status sshd.service is the correct command because it provides a concise overview of the service's current state, including active/inactive, main PID, and the last few log lines. It combines status and recent logs in one output, exactly matching the administrator's need. Other commands either only show logs or only list units without detailed status.

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

    Why it's wrong here

    systemctl show sshd.service outputs all properties of the unit, including many low-level settings, but it does not provide a human-readable summary of active state or recent logs. It is verbose and lacks the concise status and log tail that the administrator needs. It is better for scripting or inspecting specific properties.

  • ✓

    systemctl status sshd.service

    Why this is correct

    systemctl status sshd.service displays the current state of the service, including whether it is active, the main PID, and the most recent log lines. This directly provides the runtime status and recent logs as requested. It is the standard command for checking a service's health and recent activity in systemd.

  • ✗

    journalctl -u sshd.service -f

    Why it's wrong here

    journalctl -u sshd.service -f follows the journal for the sshd unit, showing new log entries as they occur. It does not show the current active state, main PID, or a summary of the service status. While it provides logs, it lacks the status overview that systemctl status offers, so it does not fully meet the requirement.

  • ✗

    systemctl list-units --type=service | grep sshd

    Why it's wrong here

    This command lists all service units and filters for sshd, showing only the unit name, load state, active state, and description. It does not show the main PID or recent log entries. While it confirms if the service is active, it lacks the detailed status and logs required by the scenario.

About these practice questions

This LFCS question is part of Courseiva's 406-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint

This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.