SysV init and Runlevels
On SysV-based systems,/sbin/init (PID 1) manages services through predefined runlevels (0–6). Each runlevel corresponds to a different system state:

/etc/inittab: Specifies which scripts or processes to start at each runlevel/etc/init.d/: Contains the actual service scripts
Common /etc/inittab Actions

Editing /etc/inittab
Before making changes, back up the file:
After editing
/etc/inittab, reload init’s configuration without rebooting:Init Scripts and Service Directories
Service scripts live in/etc/init.d/, while each runlevel directory in /etc/rc*.d/ contains symlinks:
rcN.d directory, file prefixes determine actions:
Example for runlevel 3:
Checking and Changing Runlevels
- Show current and previous runlevels:
- Switch to single-user mode (runlevel 1):
- Reboot using runlevel 6:
- Halt using runlevel 0:
Switching runlevels will start or stop multiple services. Always save your work and notify other users before changing to runlevels 0, 1, or 6.