update-rc.d like command on Redhat Enterprise / CentOS Linux

‮‬https://www.lautturi.com
update-rc.d like command on Redhat Enterprise / CentOS Linux

On Red Hat Enterprise Linux (RHEL) and CentOS, the update-rc.d command is not available. Instead, you can use the chkconfig command to enable or disable services at different runlevels.

Here is the basic syntax for using the chkconfig command to enable a service at runlevels 3, 4, and 5:

sudo chkconfig servicename on

Replace servicename with the name of the service you want to enable.

For example, to enable the httpd service at runlevels 3, 4, and 5, you can use the following command:

sudo chkconfig httpd on

To disable a service at runlevels 3, 4, and 5, you can use the off option:

sudo chkconfig servicename off

For example, to disable the httpd service at runlevels 3, 4, and 5, you can use the following command:

sudo chkconfig httpd off

By using the chkconfig command, you can enable or disable services at different runlevels on RHEL and CentOS systems. It's always a good idea to carefully review the documentation and use the appropriate commands to manage services on your system. This will help ensure that your system is properly configured and that services are running as expected.

Created Time:2017-10-30 14:27:35  Author:lautturi