systemd Fundamentals
systemd is the system and service manager used by many Linux distributions. It runs as process ID 1, starts and supervises services, models system resources as units, and connects service state with dependency ordering and journal logs.
itLinux | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: the service manager is holding the map
systemd is the Linux component that arrives very early, becomes process ID one, and is then handed a rather large clipboard. Its job is not to run every command in one heroic line. Its job is to coordinate named resources called units.
A unit might be a service, a timer, a socket, a mount, or a target. When you ask for one to start, systemctl sends the request to the manager. The manager builds a transaction: a collection of jobs and their relationships. That is why boot is a graph rather than a long ceremonial shell script.
The graph has two species of line, which are easy to confuse because both look bossy. Wants= and Requires= decide what else joins the transaction. After= and Before= decide order when both units are already present. An After= on its own does not summon the other service from the void. Combining the two is often the intended contract, but they remain different jobs in different hats.
Unit files also have a geography. Package-provided definitions normally live under /usr/lib/systemd/system/. Local administration lives under /etc/systemd/system/, which takes precedence. A drop-in changes the selected part without copying the whole vendor unit. This is less dramatic than maintaining a private fork of a service definition, which is exactly why it helps.
When a unit file changes, daemon-reload tells the manager to reread definitions. It does not restart the running process. Starting is also different from enabling: one activates now, while the other creates links for future activation. The command names are not being difficult; they are distinguishing time from policy.
For a failure, begin with evidence. systemctl status shows the current unit state and recent messages. journalctl -u narrows the journal to the unit. systemctl cat shows the effective configuration. Then inspect dependencies, make the narrowest change, reload definitions if they changed, and verify the application itself.
That last part matters. An active unit has met its configured lifecycle contract. It has not signed a certificate promising that every user receives the correct response. systemd coordinates resources on one host; fleet rollout, distributed failover, and application health remain somebody else's paperwork. The durable map is units, jobs, state, and logs. Keep it nearby when the clipboard becomes exciting.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://systemd.io/
Supports
- systemd suite scope and PID 1 role
- Activation, control groups, transactions, and related components
- https://systemd.io/ARCHITECTURE/
Supports
- Manager inputs, unit files, D-Bus requests, and spawned processes
- https://www.freedesktop.org/software/systemd/man/latest/systemd.html
Supports
- System and user manager roles
- Manager lifecycle and unit-state model
- https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
Supports
- Unit types, load paths, precedence, drop-ins, dependencies, ordering, active states, and start limits
- https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
Supports
- Service sections, commands, types, readiness, restart behavior, and main-process tracking
- https://www.freedesktop.org/software/systemd/man/latest/systemctl.html
Supports
- Runtime control, enablement, masking, daemon reload, inspection, and reset-failed behavior
- https://www.freedesktop.org/software/systemd/man/latest/journalctl.html
Supports
- Journal output and filters by unit, boot, process, and fields
- https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html
Supports
- Volatile, persistent, automatic, and disabled journal storage behavior
- https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html
Supports
- Socket ownership and on-demand service activation
- https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html
Supports
- Monotonic and calendar timer activation
- https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html
Supports
- Control-group hierarchy, slices, and resource settings
- https://www.freedesktop.org/software/systemd/man/latest/systemd-analyze.html
Supports
- Boot timing, critical chains, unit verification, graphs, and service exposure review
- https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html
Supports
- Service execution environment, sandboxing settings, and DynamicUser
- https://systemd.io/CONTROL_GROUP_INTERFACE/
Supports
- Service, scope, slice, and transient unit relationships with Linux control groups
- https://0pointer.de/blog/projects/systemd.html
Supports
- 2010 announcement date
- Initial unit, dependency, transaction, parallelization, activation, and control-group design
- https://fedoraproject.org/wiki/Features/systemd
Supports
- Fedora 15 replacement of Upstart with systemd
- https://fedoraproject.org/wiki/Releases/15
Supports
- Fedora 15 final release date
- https://raw.githubusercontent.com/systemd/systemd/main/NEWS
Supports
- Version 38 journal milestone
- Version 197 calendar timer milestone
- Version 205 scopes, slices, and transient units
- Version 230 DynamicUser
- Version 235 network access controls
- Version 245 userdb, homed, and repart additions
- https://lwn.net/Articles/474968/
Supports
- Version 38 release date and first journal release
- https://lwn.net/Articles/490413/
Supports
- Planned udev and systemd source-tree merge while retaining separate binaries
- https://lwn.net/Articles/499480/
Supports
- Version 183 as the release incorporating the udev merge
- https://lwn.net/Articles/531850/
Supports
- Version 197 date and calendar timer feature
- https://lists.freedesktop.org/archives/systemd-devel/2017-October/039595.html
Supports
- Version 235 date and address allow and deny controls
- https://systemd.io/USERDB_AND_DESKTOPS/
Supports
- Version 245 introduction of systemd-homed and userdb
- https://github.com/sindresorhus/awesome
Supports
- Discovery path to the Awesome Sysadmin list
- https://github.com/awesome-foss/awesome-sysadmin
Supports
- Ecosystem discovery for Cockpit and Monit
- https://cockpit-project.org/guide/latest/feature-systemd.html
Supports
- Cockpit management of systemd services and sockets through systemd APIs
- https://cockpit-project.org/guide/latest/feature-journal.html
Supports
- Cockpit use of journal data and journalctl
- https://mmonit.com/monit/documentation/monit.html
Supports
- Monit process, resource, protocol, response, restart, and alert checks
- https://github.com/OpenRC/openrc/blob/master/user-guide.md
Supports
- OpenRC dependency graph, runlevels, service scripts, process model, and license
- https://smarden.org/runit/
Supports
- runit init stages, per-service supervision, platform role, and license
- https://skarnet.org/software/s6/
Supports
- s6 process supervision, readiness, socket activation, related components, and license
- https://davmac.org/projects/dinit/
Supports
- Dinit service-manager and init roles, scope, dependencies, supervision, and license
- https://www.freedesktop.org/software/systemd/man/latest/systemd-run.html
Supports
- Transient service units and properties created by systemd-run
- User-manager execution and unit naming for the disposable exercise
