systemd unit
One object systemd manages, such as a service, a mount or a target, described by a unit file and named with a suffix like web.service.
In more detail
Units connect into a graph through dependency and ordering settings, which is how systemd decides what to start and when. Their state (active or not) and their enablement (start at boot or not) are separate facts. systemctl list-units and systemctl list-dependencies show the graph.
Related terms
- unit file — The text file, in a simple key=value format with sections such as [Unit], [Service] and [Install], that declares a systemd unit.
- systemd service — A systemd unit that describes a long-running or one-shot process: what command to run, as which user and what to do when it exits.
- systemd target — A systemd unit that groups other units into a milestone, such as multi-user.target for a normal server boot.
- unit dependency — A setting that says a systemd unit needs another unit started with it, either softly (Wants=) or strictly (Requires=).
- unit ordering — Settings (After= and Before=) that say when a systemd unit starts relative to others, independent of whether it pulls them in.
Taught in
- systemd: Units, Targets And The Boot Graph — Linux Fundamentals & Systems Administration
- Your Own Unit, And Reading journald — Linux Fundamentals & Systems Administration
- The Diagnostic Ladder: Is It Up, Is It Named, Is It Routed — Linux Fundamentals & Systems Administration