what is chkconfig command with its examples

The chkconfig is used to update and query the runlevel information for system services. It comes from “chkconfig-x.x.x” package. Using chkconfig we can find any service’s startup configuration is it enabled or disbled during the system boot, which is helpful to set the services during the system boot.

Examples:

1. To see the current runlevel states for all the services

$ chkconfig –list

2. To list a particular service status

$ chkconfig –list nfs

3. To add a service script into the runlevel

$ chkconfig –add /etc/init.d/myservice.sh

4. To delete a service script from the runlevels

$ chkconfig –del /etc/init.d/myservice.sh

5. To specify the runlevel for any service, which should pertain to it

$ chkconfig –level

Related Commands: init, ntsysv, system-config-services 

Leave a Reply

Your email address will not be published. Required fields are marked *