Linux Init SysV

chkconfig — manage SysV service runlevels

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.

What it was good for

How it works

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.

10 Practical Examples

1) List all services and runlevels

chkconfig --list

Shows which services are on/off for each runlevel.

2) Enable a service

sudo chkconfig httpd on

Turns service on for default runlevels.

3) Disable a service

sudo chkconfig httpd off

Prevents service from starting at boot.

4) Enable for specific runlevels

sudo chkconfig --level 35 httpd on

Enable only in runlevels 3 and 5.

5) Add a new service

sudo chkconfig --add myservice

Add service script to management system.

6) Remove a service

sudo chkconfig --del myservice

Remove service from chkconfig control.

7) Check a single service

chkconfig --list sshd

See runlevel status of one service.

8) Verify symlinks manually

ls -l /etc/rc.d/rc3.d/ | grep httpd

See actual start/kill symlinks.

9) Understand runlevels

0 - Halt
1 - Single user
3 - Multi-user (text)
5 - Multi-user + GUI
6 - Reboot

Classic SysV runlevel meanings.

10) Modern equivalent (systemd)

systemctl enable httpd
systemctl disable httpd

systemd replaced chkconfig on modern systems.

Notes & Gotchas