nerdexam
CompTIA

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'.

System Management

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

Asystemctl disable applicationCorrect

'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.

Bchkconfig application off

'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.

Cecho "manual" > /etc/ init/ application/override

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.

Dservice application Stop

'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

#SysVinit#chkconfig#service management#runlevels

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice