Also known as: PID 1
init is, traditionally, the first user-space program the kernel executes after boot. It is assigned process ID 1 and becomes the ancestor of every other process on the system. Its job is to bring the system up (mounting filesystems, starting services, launching login prompts), to reap orphaned processes when their parents die, and ultimately to shut the system down. If PID 1 ever exits, the kernel panics.
Historically init was a small program driven by /etc/inittab and a set of runlevels (0 = halt, 1 = single user, 3 = multi-user text, 5 = graphical, 6 = reboot), each with its own collection of start/stop scripts in /etc/rc.d/. This was known as SysV init, after AT&T System V Unix. Shell scripts in /etc/init.d/ performed the real work of starting and stopping services.
Modern Linux distributions overwhelmingly use systemd as PID 1. Systemd replaces the serial script-driven model with a dependency-aware, parallelised unit system, along with integrated logging, socket activation, cgroup management, and much more. Alternatives like OpenRC (Gentoo, Alpine), runit, s6, and dinit persist in corners of the ecosystem. Regardless of which is used, the fundamental role of PID 1 remains the same: bring the system up, keep it running, and tear it down cleanly.
Discussed in:
- Chapter 13: System Services and systemd — The History: sysvinit and Its Scripts
Also defined in: Textbook of Linux