XK0-004 · Question #474
A Linux administrator needs to ensure a service no longer starts when a system running SysVinit is booted. Which of the following commands should the administrator use?
The correct answer is A. systemctl disable application. Disabling a service at boot requires the appropriate command for the init system in use - 'systemctl disable' for systemd, while the question's SysVinit context would normally call for 'chkconfig'.
Question
A Linux administrator needs to ensure a service no longer starts when a system running SysVinit is booted. Which of the following commands should the administrator use?
Options
- Asystemctl disable application
- Bchkconfig application off
- Cecho "manual" > /etc/ init/ application/override
- Dservice application Stop
How the community answered
(51 responses)- A92% (47)
- B4% (2)
- C2% (1)
- D2% (1)
Why each option
Disabling a service at boot requires the appropriate command for the init system in use - 'systemctl disable' for systemd, while the question's SysVinit context would normally call for 'chkconfig'.
'systemctl disable' removes the systemd unit symlinks that cause a service to start automatically at boot, effectively preventing it from launching on subsequent reboots. Note that the question states SysVinit, where 'chkconfig application off' (choice B) is the canonical command - this likely reflects a question error. In a systemd environment, 'systemctl disable' is the correct and supported method to prevent boot-time service startup.
'chkconfig application off' is the correct SysVinit command for disabling a service at boot, but it is marked incorrect here, suggesting the question intends a systemd context despite its stated SysVinit premise.
The 'echo manual' override syntax is specific to the Upstart init system, not SysVinit, and the file path shown (/etc/init/application/override) is malformed with extra spaces.
'service application stop' stops a currently running service instance but has no effect on whether the service is enabled to start automatically on the next boot.
Concept tested: Disabling boot-time service startup across Linux init systems
Source: https://www.freedesktop.org/software/systemd/man/systemctl.html
Topics
Community Discussion
No community discussion yet for this question.