Which command lists the active state of all loaded service units?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command lists the active state of all loaded service units?

Explanation:
Viewing the status of all service units that are currently loaded in memory is done with a systemctl listing command. Using systemctl list-units --type=service shows every loaded service unit in a single table, and the ACTIVE column in that table conveys each unit’s current state—whether it’s active, inactive, or failed. This gives you a quick, comprehensive snapshot of what services are running and what state they’re in. Systemctl status --type=service is not the right choice for this because it reports the status of a specific unit (or a subset you specify), not all loaded services. Systemctl list-dependencies shows what a unit depends on, not the active state of all loaded services. The listing command filters to service units, and by default shows their active state, which is exactly what you need to answer this question. If you wanted to show only those services that are actively running, you could add --state=active, but the basic command already includes the active state for each unit.

Viewing the status of all service units that are currently loaded in memory is done with a systemctl listing command. Using systemctl list-units --type=service shows every loaded service unit in a single table, and the ACTIVE column in that table conveys each unit’s current state—whether it’s active, inactive, or failed. This gives you a quick, comprehensive snapshot of what services are running and what state they’re in.

Systemctl status --type=service is not the right choice for this because it reports the status of a specific unit (or a subset you specify), not all loaded services. Systemctl list-dependencies shows what a unit depends on, not the active state of all loaded services. The listing command filters to service units, and by default shows their active state, which is exactly what you need to answer this question. If you wanted to show only those services that are actively running, you could add --state=active, but the basic command already includes the active state for each unit.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy