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…
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)- A90% (52)
- B5% (3)
- C2% (1)
- D3% (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
Community Discussion
No community discussion yet for this question.