Skip to main content
>_ supraj.dev
TOPIC LINUX
Systemd & Services what keeps daemons running
IN 10 SECONDS

Systemd is the first process (PID 1) started by the Linux kernel. It manages service units, starts daemons in parallel, resolves dependency graphs, and restarts crashed processes.

GOTCHA Systemd services run in an isolated environment. They do not inherit environment variables from your user shell configuration (.bashrc).
HOW A SERVICE START FLOWS
01 Unit load systemd reads the service definition file (e.g. nginx.service).
02 Dependency check verifies target prerequisites (like network online) are satisfied.
03 Execution spawns the daemon process and tracks its PID.
04 Monitoring logs stderr/stdout to journald and restarts service if it exits unexpectedly.
POKE IT YOURSELF
systemctl status nginx — check status and recent logs of a daemon
journalctl -u nginx -f — stream live logs for a specific unit