chkconfig manages symbolic links in /etc/rc.d/
to control which services start at specific runlevels.
Common on older Red Hat, CentOS, and SysV-init based systems.
SysV init used numbered runlevels. Services had startup scripts in:
/etc/init.d/
chkconfig created or removed symlinks inside:
/etc/rc.d/rc*.d/
These links determined whether a service started (S) or stopped (K) at a given runlevel.
chkconfig --list
Shows which services are on/off for each runlevel.
sudo chkconfig httpd on
Turns service on for default runlevels.
sudo chkconfig httpd off
Prevents service from starting at boot.
sudo chkconfig --level 35 httpd on
Enable only in runlevels 3 and 5.
sudo chkconfig --add myservice
Add service script to management system.
sudo chkconfig --del myservice
Remove service from chkconfig control.
chkconfig --list sshd
See runlevel status of one service.
ls -l /etc/rc.d/rc3.d/ | grep httpd
See actual start/kill symlinks.
0 - Halt 1 - Single user 3 - Multi-user (text) 5 - Multi-user + GUI 6 - Reboot
Classic SysV runlevel meanings.
systemctl enable httpd systemctl disable httpd
systemd replaced chkconfig on modern systems.