Chkconfig

From Wiki
Jump to navigation Jump to search

This Red Hat tool is used to manage automatic startup of services on boot. A service needs a valid startup script in /etc/init.d to be eligible. The init startup must contain two commented lines somewhere at the top. For example:

# chkconfig: 2345 20 80
# description: Saves and restores system entropy pool for \
#              higher quality random number generation.

2345 represents the runlevels in which the service should be up. 20 is startup priority and 80 is shutdown priority.

To see all entries:

chkconfig --list

To see an entry for a particular service:

chkconfig --list <service>

To add a service that has a valid startup script in /etc/init.d:

chkconfig --add <service>

To delete a service from the chkconfig system:

chkconfig --del <service>

To turn a service on or off:

chkconfig <service> on|off