XK0-005 · Question #812
A systems administrator wants to check if the ntpd service is configured to start on startup. Which of the following commands will show that information when run?
The correct answer is C. systemctl is-enabled ntpd.service. The systemctl is-enabled command is used to determine if a systemd service is configured to start automatically at boot time.
Question
A systems administrator wants to check if the ntpd service is configured to start on startup. Which of the following commands will show that information when run?
Options
- Asystemctl is-active ntpd.service
- Bsystemctl stop ntpd.service
- Csystemctl is-enabled ntpd.service
- Dsystemctl start ntpd.service
How the community answered
(45 responses)- A4% (2)
- B2% (1)
- C87% (39)
- D7% (3)
Why each option
The systemctl is-enabled command is used to determine if a systemd service is configured to start automatically at boot time.
systemctl is-active ntpd.service checks if the service is currently running or stopped/failed, not if it's configured for startup.
systemctl stop ntpd.service is used to stop a running service, not to check its startup configuration.
The systemctl is-enabled <service_name> command checks whether a given systemd service is configured to start automatically when the system boots. An 'enabled' status indicates the service will launch on startup, while 'disabled' means it will not.
systemctl start ntpd.service is used to start a service immediately, not to query its enabled status.
Concept tested: systemctl service enabled status
Source: https://www.freedesktop.org/software/systemd/man/systemctl.html
Topics
Community Discussion
No community discussion yet for this question.