nerdexam
CompTIA

XK0-006 · Question #78

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. systemctl is-enabled ntpd.service checks whether a service is configured to start automatically at boot by querying its "enabled" state in the init system - exactly what the administrator needs. Option A (is-active) only tells you if the service is currently running, not…

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

(28 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    93% (26)

Explanation

systemctl is-enabled ntpd.service checks whether a service is configured to start automatically at boot by querying its "enabled" state in the init system - exactly what the administrator needs. Option A (is-active) only tells you if the service is currently running, not whether it will start on boot. Option B (stop) actively stops the running service, and Option D (start) actively starts it - both are operational commands, not status checks.

Memory tip: Think of the word pair "enabled = boot" vs "active = now". If you want to know about startup behavior, reach for is-enabled; if you want to know about the current moment, reach for is-active.

Topics

#systemctl#is-enabled#service startup#systemd

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice