Using chkconfig to control initscripts

During bootup, the system will execute scripts and updates and queries runlevel information for system services.

Each service which should be manageable by chkconfig.

These tools manage services that are started up by scripts in the /etc/rc.d/init.d directory.

This command in Linux that allows you to control what services start.

As root, type the following to get a list of all services chkconfig handles:

You see a list of services, use the –list option shows us a sampling of services managed by chkconfig.

You can use the on the option to have service started at specified runlevels, and the off option to disable it, see below.

The structure of command is :

This means:

–levels levels define the run levels in which you want the particular service switch to be turned.

service is the service we want enabled/disabled.

switch is on/off, meaning enabled/disabled.

If you want than reset with the reset option to restores a service.

If you want a service removed entirely from the entire startup and shutdown process in all runlevels than use:

You can also add services to chkconfig management than use this:

Under Ubuntu we have this tool: sysv-rc-conf and the usage is practically identical to chkconfig.

By default, the utility is not installed on Ubuntu.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.