update-rc.d Command Examples in Linux

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.

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