systemd
systemd is a set of building blocks for Linux systems comprising an init system designed for aggressive parallelisation and capable of bus- and socket-based activation, per-unit control groups, journalling, network device management, volume mounts, time synchronisation and name resolution. It aims to replace SysV-style init.
Concepts
- Units describe a resource under systemd's management. They're usually defined in INI files with one of the below extensions, though some are managed at runtime:
service
for one-shot or long-running processes.socket
for socket-based activation of a service.device
for audev
orsysfs
device, allowing declaration of dependencies.mount
for a mountpoint.automount
for a mountpoint managed withautomount
.swap
for swap devices or files.target
for synchronisation points during boot (e.g. network available) or the equivalent of runlevels (e.g. multi-user).path
for path-based activation.timer
for timer-based activation.slice
for hierarchical management of process groups, though the root slice (-.slice
) is not backed by a file.scope
units allow grouping processes at runtime, e.g. to set per-group resource limits.
- Drop-ins (short for "drop-in replacements") are additional configuration files used to augment an existing configuration with either an override or some additional values. This is commonly represented as a
${unit}.d
directory containing an arbitrary number of configuration files. - The journal serves as a replacement for syslog; handling early boot, kernel and unit log messages. Logs are recorded in a structured and indexed binary file, and retained up to the limit set by
SystemMaxUse
via a ring buffer.
SysV init compatibility
systemd-initctl
(managed by the systemd-initctl.service
unit) provides a /dev/initctl
FIFO compatible with SysV init.
Paths
/usr/lib/systemd
contains system-installed units, usually installed by the system package manager (Private)./etc/systemd
is for site units.~/.config/systemd
contains user units.
References
Backlinks