Frequently Asked Question
Why does systemd run as PID 1, and why does that matter?
When the Linux kernel finishes booting and mounts the real root filesystem, it executes
a single user-space program, by convention /sbin/init, and gives it process ID 1.
Everything else on the system descends from PID 1: it is the ancestor of every process,
and when an orphaned process's parent exits, PID 1 inherits ("reaps") it. If PID 1 dies,
the kernel panics. So PID 1 is special: it must be reliable, it must never exit, and it
must correctly clean up zombie children.
Historically PID 1 was a tiny C program (sysvinit was a few hundred lines). systemd is much larger, which critics see as a violation of the rule that PID 1 should be minimal. Defenders argue that the responsibilities of an init system have grown, supervising services, tracking them via cgroups, restarting them on failure, handling socket activation, and that doing the job properly requires more code than sysvinit had. Either way, what matters in practice is that systemd takes the slot the kernel hands to PID 1 and is the orchestrator for everything that runs afterwards.