update-rc.d: command not found

update-rc.d is a Linux command-line utility used to manage System-V style init script links, which are used to start, stop, and manage system services at boot time. Init scripts are typically stored in the /etc/init.d/ directory and are started using the init process, which is the first process started by the Linux kernel.

update-rc.d is used to install or remove init scripts, which are run at specific runlevels during the system startup process. When you install a new service or application on your Linux system, you will often need to create an init script that defines how the service should be started, stopped, and managed. This script is then linked to the appropriate runlevel directories using update-rc.d.

If you encounter the below error while running the command update-rc.d:

update-rc.d: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install init-system-helpers
Ubuntu apt-get install init-system-helpers
Kali Linux apt-get install init-system-helpers
Raspbian apt-get install init-system-helpers

update-rc.d Command Examples

1. Install a service:

# update-rc.d mysql defaults

2. Enable a service:

# update-rc.d mysql enable

3. Disable a service:

# update-rc.d mysql disable

4. Forcibly remove a service:

# update-rc.d -f mysql remove

Summary

In summary, update-rc.d is a useful utility for managing System-V style init script links. It provides an easy way to install or remove init scripts, which are necessary for starting, stopping, and managing system services at boot time.

Related Post