Friday, 8 March 2013

Contolling startup scripts using chkconfig

chkconfig examples Linux a guide to controlling which services start during boot.

Listing current chkconfig settings.
# chkconfig --list

Add a service to the startup list if not already there. In this example vsftpd.
# chkconfig --add vsftpd

To set the service to start during boot (Will add to runlevels 2,3,4 and 5).
# chkconfig vsftpd on

To add to a specific runlevel 3 in this example.
# chkconfig --level 3 vsftpd on

To disable a service on boot will turn to off for all runlevels.
# chkconfig vsftpd off

To disable at a specific runlevel.
# chkconfig --level 3 vsftpd off

To remove a service from the chkconfig setup.
# chkconfig  --del vsftpd