Interview Prep/Linux/Boot Process & Kernel

What is systemd and why did it replace SysV init?

BeginnerConceptBoot Process & Kernel
Answer

In one line: systemd is the first process Linux starts (PID 1). It starts, stops and watches over all other services on the system.

What systemd does for you:

  • Starts services in parallel, in the right order based on dependencies — so boot is fast.
  • Restarts services that crash, if you tell it to (Restart=on-failure).
  • Collects logs from every service in one place (journalctl).
  • Runs scheduled jobs with timers (a modern alternative to cron).

Why it replaced the old SysV init: SysV init ran shell scripts one after another, which was slow, and it didn't watch services after starting them — if an app crashed, it stayed down until someone noticed.

Example — everyday systemd commands:

sudo systemctl start nginx       # start now
sudo systemctl enable nginx      # start automatically at boot
systemctl status nginx           # is it running? recent logs?
sudo systemctl restart nginx     # restart after a config change
journalctl -u nginx -f           # follow nginx logs live

Tip for interviews: mention that you can run your own app as a systemd service with a unit file, so it starts on boot and restarts automatically if it crashes.

All Linux questions Roadmap: Linux

More on Boot Process & Kernel