systemd is the init system and service manager used by the majority of modern Linux distributions, running as PID 1 and managing the entire lifecycle of processes, sockets, timers, mounts, and more from boot to shutdown. It replaces SysVinit and Upstart by expressing system configuration as declarative unit files β INI-style text files that define services, timers, sockets, and other resources. The critical mental model is that everything in systemd is a unit, the dependency graph between units determines boot order and parallelization, and a single misconfigured After= or Wants= line can silently reorder startup in non-obvious ways β making systemd-analyze critical-chain an essential troubleshooting tool.
What This Cheat Sheet Covers
This topic spans 19 focused tables and 228 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: systemctl Service Control Commands
systemctl is the primary interface for controlling services and other units at runtime. These commands operate on a running system immediately but do not persist behavior across reboots unless combined with enable.
| Command | Example | Description |
|---|---|---|
systemctl start nginx.service | Starts a unit immediately; does not enable it to start at boot. | |
systemctl stop nginx.service | Stops a running unit immediately. | |
systemctl restart nginx.service | Stops then starts a unit; works even if the unit was not running. | |
systemctl reload nginx.service | Sends the unit's ExecReload= command to reload config without stopping the process. | |
systemctl reload-or-restart nginx.service | Reloads if the unit supports it; falls back to full restart if it does not. | |
systemctl status nginx.service | Shows active state, recent journal entries, PID, cgroup, and runtime info. |