LFCS Service Configuration Practice Question
Which TWO commands can be used to check whether a systemd service is currently running?
⚠ Common exam trap
Watch out — candidates often confuse 'is-enabled' (boot-time configuration) with 'is-active' (current runtime state), or think that listing all running units (option B) is a valid way to check a specific service, when in fact it requires additional parsing and does not directly answer the question.
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 service
`systemctl status service` displays the current status of a systemd unit, including whether it is active (running), along with recent log entries and process details. Option C is correct because `systemctl is-active service` returns a simple exit code and output (active/inactive) indicating whether the unit is currently running, making it ideal for scripting.
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 status service
Why this is correct
Shows status including active/inactive state.
- ✗
systemctl list-units --state=running
Why it's wrong here
Lists all running units, but needs to be filtered.
- ✓
systemctl is-active service
Why this is correct
Returns 'active' if running, 'inactive' otherwise.
- ✗
systemctl is-enabled service
Why it's wrong here
Checks if service is enabled to start at boot.
- ✗
systemctl show service
Why it's wrong here
Shows unit properties, not active state.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.