init is the first program that is executed when Linux system boots up. All other deamons are child process of this process.
- init program resides at root filesystem (
/sbin/init
). Most other processes on the system trace their origin ultimately to init. - Besides starting the system, init is responsible for keeping the system running and for shutting it down cleanly.
- One of its responsibilities is to act when necessary as a manager for all non-kernel processes
Drawbacks of init
- Unix SysV init viewed things as a serial process, divided into a series of sequential stages. Each stage required completion before the next could proceed. Thus, startup did not easily take advantage of the parallel processing that could be done on multiple processors or cores.
- Furthermore, shutdown and reboot was seen as a relatively rare event; exactly how long it took was not considered important. This is no longer true, especially with mobile devices and embedded Linux systems.
- Its process ID (PID) is always 1.
- Latest Linux distributions use systemd instead of init
systemd was adopted as alternative to the init.
- Systems with
systemd
start up faster than those with earlierinit
methods. This is largely because it replaces a serialized set of steps with aggressive parallelization techniques, which permits multiple services to be initiated simultaneously. /sbin/init
now just points to/lib/systemd/systemd
; i.e.systemd
takes over theinit
process.