nerdexam
CompTIA

XK0-005 · Question #127

A junior Linux administrator needs to ensure a service will start on system boot. Which of the following commands should be used to accomplish this task?

The correct answer is A. chkconfig <service> on. 'chkconfig <service> on' is the correct command for enabling a service to start at boot on systems using SysVinit or Upstart (common on older RHEL/CentOS systems). It registers the service to start in the appropriate runlevels. Option B is incorrect because 'systemctl enable…

System Management

Question

A junior Linux administrator needs to ensure a service will start on system boot. Which of the following commands should be used to accomplish this task?

Options

  • Achkconfig <service> on
  • Bsystemctl <service> bootup
  • Cservice <service> enable
  • Dcrontab install <service>

How the community answered

(58 responses)
  • A
    90% (52)
  • B
    5% (3)
  • C
    2% (1)
  • D
    3% (2)

Explanation

'chkconfig <service> on' is the correct command for enabling a service to start at boot on systems using SysVinit or Upstart (common on older RHEL/CentOS systems). It registers the service to start in the appropriate runlevels. Option B is incorrect because 'systemctl enable <service>' is the correct systemd syntax - 'bootup' is not a valid systemctl subcommand. Option C is incorrect because the 'service' command is used to start/stop/status services, not enable them at boot; the correct equivalent would be 'systemctl enable'. Option D ('crontab install') is not a valid command and has no relationship to service management or boot-time startup.

Topics

#Linux services#Service management#Boot process#chkconfig command

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice