Init, short for "initialization," is the first process the Linux kernel starts after booting. It is responsible for bringing the system to a usable state by starting system processes, running startup scripts, and managing runlevels.
SysvInit, Systemd, and OpenRC are the different and most used init systems.
SysvInit is the traditional, older system that uses sequential scripts; Systemd is a more recent, comprehensive system that features parallel startup and a wide range of tools; and OpenRC is a lightweight, dependency-based alternative that can work with SysvInit or on its own.
SysvInit
Systemd
OpenRC
Services Commands
| Task / System | SysVInit | systemd | OpenRC |
|---|---|---|---|
| Start a service | service <service> start | systemctl start <service>.service | rc-service <service> start |
| Stop a service | service <service> stop | systemctl stop <service>.service | rc-service <service> stop |
| Restart a service | service <service> restart | systemctl restart <service>.service | rc-service <service> restart |
| Reload a service | service <service> reload | systemctl reload <service>.service | rc-service <service> reload |
| Service status | service <service> status | systemctl status <service>.service | rc-service <service> status |
| Enable a service at boot | chkconfig <service> on | systemctl enable <service>.service | rc-update add <service> |
| Disable a service at boot | chkconfig <service> off | systemctl disable <service>.service | rc-update del <service> |
| Check if a service is enabled at boot | chkconfig <service> | systemctl is-enabled <service>.service | rc-update -v | grep <service> |
Miscellaneous system commands
| Task / System | SysVInit | systemd | OpenRC |
|---|---|---|---|
| Halt the system | halt | systemctl halt | halt |
| Power off the system | poweroff | systemctl poweroff | poweroff |
| Reboot the system | reboot | systemctl reboot | reboot |
| Suspend the system | pm-suspend | systemctl suspend | pm-suspend |
| Hibernate the system | pm-hibernate | systemctl hibernate | pm-hibernate |
| Show system logs | tail -f /var/log/messages or tail -f /var/log/syslog | journalctl -f | tail -f /var/log/messages |