To check whether a service is configured to start automatically at boot (enabled) without starting it, which command would you use?

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

To check whether a service is configured to start automatically at boot (enabled) without starting it, which command would you use?

Explanation:
Checking whether a service is configured to start automatically at boot is a matter of querying systemd about the unit’s enablement state without affecting the unit itself. The best command for this is to ask systemd whether the unit is enabled to start at boot. It will simply print enabled if the unit is configured to start on boot, or disabled if it is not, and it won’t start or stop the service. This direct query is preferable to other commands: viewing status can show a hint of enablement but mixes runtime state with boot behavior, enabling would change the configuration, and showing UnitFileState is more verbose and not as straightforward for this exact check.

Checking whether a service is configured to start automatically at boot is a matter of querying systemd about the unit’s enablement state without affecting the unit itself. The best command for this is to ask systemd whether the unit is enabled to start at boot. It will simply print enabled if the unit is configured to start on boot, or disabled if it is not, and it won’t start or stop the service. This direct query is preferable to other commands: viewing status can show a hint of enablement but mixes runtime state with boot behavior, enabling would change the configuration, and showing UnitFileState is more verbose and not as straightforward for this exact check.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy