Courseiva
Service ConfigurationeasyMultiple ChoiceObjective-mapped

LFCS Service Configuration Practice Question

Which command displays the current status of all active services?

⚠ Common exam trap

Many exam-takers confuse `systemctl status --all` (which shows all units regardless of state) with listing only active services, or they mistakenly think `systemctl list-unit-files` shows current runtime status instead of disk-based enablement configuration.

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 list-units --type=service --state=active

`systemctl list-units --type=service --state=active` filters systemd units to show only those of type 'service' that are currently in the 'active' state (i.e., running or exited but still considered active). This is the precise command to list all active services without showing inactive or failed units.

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 --state=active

    Why this is correct

    This command filters for active services only.

  • systemctl status --all

    Why it's wrong here

    status --all shows all units (services, sockets, mounts, etc.), not just services.

  • systemctl show --type=service

    Why it's wrong here

    show displays properties of a unit, not its active status.

  • systemctl list-unit-files --type=service

    Why it's wrong here

    list-unit-files shows all unit files, not their runtime state.

About these practice questions

This LFCS question is part of Courseiva's 507-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 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.