Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Units

Direct answer

A systemd unit is anything systemd manages, named by type suffix: .service (daemon), .socket, .timer, .mount, .target (group), .path, .device and more. Units have state (active, inactive, failed) and can depend on each other.

When to use this

Use it when a service, mount or timer does not start, or to see what systemd manages.

First 30 seconds

1. systemctl list-units --failed — anything failed?

2. systemctl status <unit> — active state and last lines.

3. journalctl -u <unit> -b — full log.

4. systemctl cat <unit> — which file and drop-ins apply.

5. Fix, systemctl daemon-reload if files changed, then restart.

Operational verification

unit file loaded → dependencies resolved → unit started → active (or failed) → logged in the journal

Evidence · next step

For systemd & Services → Units, continue with the first unproven Topic check: Resolve the canonical unit name, suffix/type and instance if templated. If that boundary is healthy, advance to the adjacent check: Capture load state, fragment path, drop-ins and key properties. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it when a service, mount or timer does not start, or to see what systemd manages.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

unit name/type → fragment + drop-ins → manager load state → dependency/order edges → activation transaction → active/sub state → represented resource result

Healthy evidence: the intended canonical unit loads from expected sources with correct relationships and its represented resource reaches verified operational state.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Resolve the canonical unit name, suffix/type and instance if templated.

  • Capture load state, fragment path, drop-ins and key properties.
  • Inspect requirement and ordering relationships separately.
  • Validate the resource or application represented by the unit after activation.

Verification chain. unit name/type → fragment + drop-ins → manager load state → dependency/order edges → activation transaction → active/sub state → represented resource result

Step 3 Specialized verification Verify boundary

Confirm the exact unit name and use the effective-unit view to see the loaded fragment and drop-ins. Inspect dependencies in the direction relevant to the problem, then examine current jobs and active/sub states. For template units, verify the concrete instance and its expanded parameters. If the unit represents a mount, timer or socket, verify the resource-specific outcome rather than stopping at the generic active state. Compare the on-disk override to the loaded manager state after daemon-reload.

Step 4 Commands Verify boundary
systemctl list-units
systemctl list-unit-files --type=service
Step 5 Failure modes and next checks Narrow the fault

Suspicious evidence: an alias, stale fragment, hidden drop-in or misunderstood dependency causes operators to act on a different effective unit than intended.

Unit metadata shows systemd representation and manager configuration, not successful activation or resource health.

Step 6 Special cases and limits Narrow the fault

Unit identity is not interchangeable with a process name. A target can be active without every optional wanted unit being healthy, and a service alias can obscure the canonical unit name. Ordering is not a health dependency, and dependency cycles can be introduced by seemingly reasonable Before/After edits. A unit file that parses does not show the referenced executable, user, path or dependency is valid at runtime. Keep unit model, job graph and resource outcome separate.

Step 7 Common mistakes Narrow the fault
  • Confusing loaded/active state with enabled state.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Unit files live in /usr/lib/systemd/system (packages), /etc/systemd/system (admin, wins) and /run. Override with drop-ins (systemctl edit <unit>) instead of editing package files.

Key checks
  • systemctl status <unit> — state, main PID, recent log lines
  • systemctl list-units --failed — failed units
  • journalctl -u <unit> -b — the unit's log since boot
  • systemctl cat <unit> — unit file plus drop-ins
  • systemd-analyze verify <unit> — unit file errors
ReferenceWhat it is1 section · depth on demand

Core model

Resolve the fully qualified unit name and type, including aliases/templates/instances where relevant. Inspect load state, fragment path, drop-ins and dependency edges before acting. A unit being loaded only shows systemd parsed a definition; activation and workload behavior are separate things to check.

ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

Unit metadata shows systemd representation and manager configuration, not successful activation or resource health.

In depth

Unit types and where unit files live

Everything systemd manages is a unit, and the suffix of its name says what kind. The systemd.unit(5) manual page lists the types: service, socket, device, mount, automount, swap, target, path, timer, slice and scope.

In system mode, unit files are read from /etc/systemd/system, /run/systemd/system and /usr/lib/systemd/system, among others. A file earlier in that list overrides one with the same name later in it.

Unit types

TypeRepresentsExample
.serviceA process or daemonnginx.service
.socketA listening socket that starts a service on demandsshd.socket
.targetA group of units, a synchronisation pointmulti-user.target
.timerA schedule that starts another unitlogrotate.timer
.mount / .automountA mount point (often generated from fstab)srv-data.mount
.pathWatches a file system pathcups.path
.deviceA kernel device exposed by udevdev-sda.device
.swapA swap device or filedev-zram0.swap
.sliceA cgroup branch for resource controluser.slice
.scopeExternally started processes (e.g. login sessions)session-3.scope

Directory precedence

DirectoryWho writes itPrecedence
/etc/systemd/systemThe administratorHighest
/run/systemd/systemRuntime and generatorsMiddle
/usr/lib/systemd/systemPackagesLowest

Never edit files under /usr/lib, because package updates overwrite them. Use a drop-in in /etc, or copy the file there.

Masking

A unit symlinked to /dev/null, or left empty, has the load state "masked" and can't be started at all, not even as a dependency.

host$ systemctl list-unit-files --type=service --state=enabled --no-legend | head -4
host$ systemctl list-units --type=mount --no-legend
  boot-efi.mount   loaded active mounted /boot/efi
  srv-data.mount   loaded active mounted /srv/data
host$ systemd-escape --path /srv/data
srv-data
host$ systemctl show -p FragmentPath,DropInPaths,UnitFileState cron.service
host$ ls -l /etc/systemd/system/*.service | grep -- '-> /dev/null'

Unit names from paths

Mount, automount and swap units are named after their path, with / replaced by -. systemd-escape --path gives the exact name. This matters when you write dependencies such as RequiresMountsFor= or After=srv-data.mount.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Units is part of systemd & Services → Units. Units are systemd objects representing manageable resources such as services, sockets, targets, mounts, timers and paths; unit type, load state, dependencies and activation semantics determine what systemd can coordinate.

Topic-specific state model. Units are systemd objects representing manageable resources such as services, sockets, targets, mounts, timers and paths; unit type, load state, dependencies and activation semantics determine what systemd can coordinate.

Interpretation rule. - Unit loaded ≠ unit active.

  • Unit alias/name resolution ≠ same semantics as the canonical unit in every context.
  • Dependency listed ≠ ordering relationship unless the appropriate ordering edge also exists.
  • Unit active ≠ resource/application is functionally acceptable.

Specialized mechanics

A systemd unit is the manager’s named object for a service, socket, timer, mount, target, path, device or other managed resource. The unit name encodes type through its suffix and can participate in templating/instances, aliases and dependency graphs. Unit state includes load, active and substate dimensions, while jobs represent pending transitions. The same conceptual service can therefore involve several cooperating units, for example a .socket activating a .service or a .timer activating another unit.

Quick reference

systemd manages everything as units, identified by suffix:

TypePurpose
.serviceDaemons and one-shot tasks
.socketSocket activation
.timerScheduled activation
.targetGroups/synchronisation points
.mount / .automountFilesystems (generated from fstab)
.pathActivation on file changes
.slice / .scopecgroup resource groups
.deviceKernel devices (udev)
systemctl list-units --type=service --state=running
systemctl list-unit-files --state=enabled
systemctl list-dependencies multi-user.target | head -30
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Unit metadata shows systemd representation and manager configuration, not successful activation or resource health.

ReferenceConfiguration & state2 sections · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. Units owns generic systemd unit-object semantics. Services, Targets, Timers and specific resource unit types own their specialized behavior.

Specialized lifecycle

Effective unit configuration is assembled from search-path precedence, the main fragment and drop-ins. Instance templates use escaped identifiers and % specifiers, so confirm the exact expanded unit name before editing. Dependency directives and ordering directives are orthogonal: Requires= can pull in a unit but does not itself establish startup order. Local customization should normally live in administrator drop-ins rather than modified vendor files so package upgrades remain visible and reversible.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in systemd & Services → Units. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://systemd.io/ · confidence 94%
2026-09-13 · vendor docsystemd current

Authoritative Linux project/vendor documentation reviewed for bounded reference claims: unit identity, load paths, dependencies and enablement semantics. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.

Basis: https://man7.org/linux/man-pages/man5/systemd.unit.5.html · confidence 93%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
systemd unitsunit types systemdsystemd unit objectloaded units
Embedded reference data

Quick lookup tables

Units operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Units.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateUnits are systemd objects representing manageable resources such as services, sockets, targets, mounts, timers and paths; unit type, load state, dependencies and activation semantics determine what systemd can coordinate.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host/container + timestamp → identify exact process or unit → capture PID plus start identity and cgroup/unit → resolve effective unit fragment + drop-ins → inspect dependency/order transaction → record systemd job result → verify process/cgroup and active/sub state → prove application readiness → repeat the original workload test.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainunit name/type → fragment + drop-ins → manager load state → dependency/order edges → activation transaction → active/sub state → represented resource resultTrace requested/configured state through effective state to the observed workload result.
Failure boundaryUnit metadata proves systemd representation and manager configuration, not successful activation or resource health.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux process/systemd evidence can establish this proof path: unit name/type → fragment + drop-ins → manager load state → dependency/order edges → activation transaction → active/sub state → represented resource resultUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured process, manager, unit, dependency, runtime or application scope. Unit metadata proves systemd representation and manager configuration, not successful activation or resource health.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: reacquire stable process identity, inspect effective loaded unit configuration and dependency/job state, correlate process/cgroup plus journal evidence, then run the original readiness/workload test before changing additional settings.Continue to the next unresolved boundary while preserving the original test condition.

Units · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryUnits
Topic pathsystemd & Services → Units
Runtime stateUnits are systemd objects representing manageable resources such as services, sockets, targets, mounts, timers and paths; unit type, load state, dependencies and activation semantics determine what systemd can coordinate.
Fast checks- Resolve the canonical unit name, suffix/type and instance if templated. - Capture load state, fragment path, drop-ins and key properties. - Inspect requirement and ordering relationships separately. - Validate the resource or application represented by the unit after activation.
Verification chainunit name/type → fragment + drop-ins → manager load state → dependency/order edges → activation transaction → active/sub state → represented resource result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryUnit metadata proves systemd representation and manager configuration, not successful activation or resource health. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.

Units · specialized operational reference

Topic-specific Linux mechanics, lifecycle, proof path and failure-boundary lookup.

Operational boundaryTopic-specific reference
IdentityExact name, suffix and instance
CompositionFragment + drop-ins + generators
GraphRequirement relations separate from ordering
ProofLoaded effective unit + resource-specific result
Confirmation

Confirm action

Continue?