nerdexam
CompTIA

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.

System Management

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)
  • A
    4% (2)
  • B
    2% (1)
  • C
    87% (39)
  • D
    7% (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.

Asystemctl is-active ntpd.service

systemctl is-active ntpd.service checks if the service is currently running or stopped/failed, not if it's configured for startup.

Bsystemctl stop ntpd.service

systemctl stop ntpd.service is used to stop a running service, not to check its startup configuration.

Csystemctl is-enabled ntpd.serviceCorrect

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.

Dsystemctl start ntpd.service

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

#systemctl#service management#startup configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice