Which command checks if httpd is configured to start automatically on boot?

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 checks if httpd is configured to start automatically on boot?

Explanation:
Understanding how to verify boot-time behavior on a systemd system is key. To see if a service is configured to start automatically at boot, you use the command that queries the unit’s enablement state. systemctl is-enabled httpd will tell you directly whether httpd is configured to start on boot, returning values like enabled, disabled, or static (the last meaning it isn’t enabled on its own but can be started by another unit). This is the most precise way to answer the question. Enabling the service (systemctl enable httpd) changes its boot behavior but doesn’t tell you the current state. systemctl status httpd shows whether the service is running and its current loaded state, and may display an enabled status in the output, but it’s not a direct check of the boot configuration. chkconfig httpd on is a SysV init-era command and isn’t the correct tool for a systemd-based system, though it might affect legacy compatibility.

Understanding how to verify boot-time behavior on a systemd system is key. To see if a service is configured to start automatically at boot, you use the command that queries the unit’s enablement state. systemctl is-enabled httpd will tell you directly whether httpd is configured to start on boot, returning values like enabled, disabled, or static (the last meaning it isn’t enabled on its own but can be started by another unit). This is the most precise way to answer the question.

Enabling the service (systemctl enable httpd) changes its boot behavior but doesn’t tell you the current state. systemctl status httpd shows whether the service is running and its current loaded state, and may display an enabled status in the output, but it’s not a direct check of the boot configuration. chkconfig httpd on is a SysV init-era command and isn’t the correct tool for a systemd-based system, though it might affect legacy compatibility.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy