Which command lists all service unit files and shows whether they are enabled or disabled?

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 all service unit files and shows whether they are enabled or disabled?

Explanation:
To see every service unit file and whether it’s set to start at boot, you use a listing command that reports unit files along with their enablement state. systemctl list-unit-files --type=service does exactly that: it presents all service unit files and shows if each one is enabled, disabled, static, or masked. The --type=service filter restricts the output to service units, so you’re not mixing in other unit types like sockets. This makes it ideal for verifying which services are configured to start automatically. Other commands don’t provide a full list with an enable/disable status for all service units: one focuses on a specific unit’s properties, another targets a different unit type, and another is used to enable services rather than list them.

To see every service unit file and whether it’s set to start at boot, you use a listing command that reports unit files along with their enablement state. systemctl list-unit-files --type=service does exactly that: it presents all service unit files and shows if each one is enabled, disabled, static, or masked. The --type=service filter restricts the output to service units, so you’re not mixing in other unit types like sockets. This makes it ideal for verifying which services are configured to start automatically. Other commands don’t provide a full list with an enable/disable status for all service units: one focuses on a specific unit’s properties, another targets a different unit type, and another is used to enable services rather than list them.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy