LFCS Service Configuration Practice Question
Which TWO commands can be used to check the status of the sshd service on a system using systemd?
⚠ Common exam trap
A common mix-up: candidates confuse `is-enabled` (boot-time configuration) with `is-active` (current runtime state), or they assume `list-units` is a valid status check when it actually requires additional filtering to isolate a specific 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 is-active sshd
`systemctl is-active sshd` directly queries systemd to report whether the sshd service is currently in an active (running) state, returning a simple exit code and text output (e.g., 'active' or 'inactive'). Option E is correct because `systemctl status sshd` provides a comprehensive view of the service's current state, including whether it is active, its PID, recent log entries, and cgroup details, making it a standard command for checking service health on systemd-based systems.
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 list-units --type=service
Why it's wrong here
Lists all services, not specific to sshd.
- ✓
systemctl is-active sshd
Why this is correct
Returns active/inactive/failed status.
- ✗
systemctl is-enabled sshd
Why it's wrong here
Checks if enabled at boot, not current status.
- ✗
systemctl cat sshd
Why it's wrong here
Displays unit file content, not status.
- ✓
systemctl status sshd
Why this is correct
Shows detailed status including active state.
Go deeper
Related to this question
About these practice questions
One of 507 original LFCS 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.