Use it to see which state the system boots into, or why a service is not started at boot.
Targets · systemd & Services
A target is a systemd unit that groups other units into a system state, such as multi-user.target (normal server) and graphical.target (desktop). It replaces SysV runlevels.
1. systemctl get-default — boot target.
2. systemctl list-dependencies multi-user.target — your service included?
3. Not included → systemctl enable <svc>.
4. systemctl is-active <target> — reached?
5. Change default with systemctl set-default.
boot → default target → its Wants/Requires pulled in → units started in dependency order
For systemd & Services → Targets, continue with the first unproven Topic check: Resolve the exact target and inspect requirement versus ordering dependencies. If that boundary is healthy, advance to the adjacent check: Identify failed/skipped units inside the transaction rather than assuming target success is universal success. 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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
target selection → wants/requires graph → before/after ordering → systemd transaction → member-unit outcomes → target active state → workload validation
Healthy evidence: target dependencies and ordering match design, failed member units are understood and critical workloads represented by the target pass acceptance checks.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Resolve the exact target and inspect requirement versus ordering dependencies.
- Identify failed/skipped units inside the transaction rather than assuming target success is universal success.
- Compare default target selection with the current active target set.
- Validate critical services/workloads represented by the target independently.
Verification chain. target selection → wants/requires graph → before/after ordering → systemd transaction → member-unit outcomes → target active state → workload validation
Step 3 Commands Verify boundary
systemctl list-dependencies multi-user.target
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: target active is treated as evidence the host is fully healthy despite failed or degraded member services.
Step 5 Common mistakes Narrow the fault
- Enabling services with the wrong
WantedBy=target.
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.
Services start at boot if they are wanted by the default target (WantedBy=multi-user.target and systemctl enable). systemctl get-default shows the boot target; systemctl isolate switches now.
systemctl status <unit>— state, main PID, recent log linessystemctl list-units --failed— failed unitsjournalctl -u <unit> -b— the unit's log since bootsystemctl cat <unit>— unit file plus drop-inssystemd-analyze verify <unit>— unit file errors
ReferenceWhat it is1 section · depth on demand
Core model
Inspect which units a target wants/requires and which ordering edges determine transaction sequence. Reaching a target means systemd completed the relevant dependency transaction as defined; it does not guarantee every service behind that state is application-healthy unless that health is explicitly modeled.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Target state shows a systemd grouping/transaction condition, not complete functional health of every service in the grouped system state.
In depth
Special targets and how services hook into them
Targets group units and mark points in the boot process. The systemd.special(7) manual page defines the well-known ones:
- default.target: what systemd starts at boot, usually an alias for multi-user.target or graphical.target. If it fails, systemd falls back to rescue.target.
- multi-user.target: the non-graphical multi-user system. Services that should start at boot normally use
WantedBy=multi-user.target. - graphical.target: pulls in multi-user.target and adds a graphical login.
- sysinit.target and basic.target: early synchronisation points that most services are automatically ordered after.
- network-online.target: an active target that waits until the network is configured. Units that need the network should want it and order themselves after it.
- timers.target: used by timer units.
Targets in day-to-day use
| Target | Typical use |
|---|---|
multi-user.target | WantedBy= for almost all server services |
graphical.target | Desktop systems |
network-online.target | Wants= + After= for services that must reach the network at start-up |
timers.target | WantedBy= for timer units |
local-fs.target / remote-fs.target | Ordering after local or network mounts |
rescue.target / emergency.target | Recovery |
network.target vs network-online.target (manual)
| Target | Guarantees |
|---|---|
network.target | Passive and weakly defined; network management has started, but no addresses are guaranteed |
network-online.target | Active; waits until the network is "sufficiently" configured, once, at boot |
A service that binds to a specific IP address, or connects to a remote database at start-up, needs network-online.target. Ordering after network.target alone causes intermittent start failures at boot.
host$ systemctl get-default
multi-user.target
host$ systemctl list-dependencies multi-user.target --no-pager | head -8
host$ systemctl list-dependencies --reverse network-online.target
host$ systemctl show -p WantedBy,After report-api.service
host$ systemctl status systemd-networkd-wait-online.service --no-pager | head -3
Why not WantedBy=default.target
The manual recommends that unit files use WantedBy= with a regular target such as multi-user.target, not default.target. Otherwise, changing the default target changes which services start, which is rarely intended.
Documented example, not captured output.
How it works at runtime
Targets is part of systemd & Services → Targets. Targets are synchronization/grouping units used to express system states or activation groupings; they primarily collect dependency relationships and provide transaction anchors rather than running a workload themselves.
Topic-specific state model. Targets are synchronization/grouping units used to express system states or activation groupings; they primarily collect dependency relationships and provide transaction anchors rather than running a workload themselves.
Interpretation rule. - Target active ≠ every associated application is healthy.
- Wants= ≠ Requires= failure propagation semantics.
- Dependency requirement ≠ ordering unless Before=/After= establishes it.
- default.target selected ≠ current boot has no degraded/failed units.
Quick reference
Targets group units and act as synchronisation points (replacing runlevels).
| Target | Meaning |
|---|---|
multi-user.target | Normal server state (runlevel 3) |
graphical.target | GUI (runlevel 5) |
rescue.target | Single user with basic system |
emergency.target | Minimal shell, root read-only |
network-online.target | Network configured (use with Wants=+After=) |
default.target | Symlink to the boot target |
systemctl get-default; systemctl set-default multi-user.target
systemctl isolate rescue.target
systemctl list-dependencies --reverse network-online.target
Limits and how it fails
Primary failure point. Target state shows a systemd grouping/transaction condition, not complete functional health of every service in the grouped system state.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Targets owns systemd grouping/synchronization semantics. Boot Process owns broader runlevel/boot-stage mapping and individual services own workload health.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in systemd & Services → Targets. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://systemd.io/ · confidence 94%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.
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.
Quick lookup tables
Targets operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Targets.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Targets are synchronization/grouping units used to express system states or activation groupings; they primarily collect dependency relationships and provide transaction anchors rather than running a workload themselves. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin 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 chain | target selection → wants/requires graph → before/after ordering → systemd transaction → member-unit outcomes → target active state → workload validation | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Target state proves a systemd grouping/transaction condition, not complete functional health of every service in the grouped system state. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux process/systemd evidence can establish this proof path: target selection → wants/requires graph → before/after ordering → systemd transaction → member-unit outcomes → target active state → workload validation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured process, manager, unit, dependency, runtime or application scope. Target state proves a systemd grouping/transaction condition, not complete functional health of every service in the grouped system state. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue 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. |
Targets · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Targets |
|---|---|
| Topic path | systemd & Services → Targets |
| Runtime state | Targets are synchronization/grouping units used to express system states or activation groupings; they primarily collect dependency relationships and provide transaction anchors rather than running a workload themselves. |
| Fast checks | - Resolve the exact target and inspect requirement versus ordering dependencies. - Identify failed/skipped units inside the transaction rather than assuming target success is universal success. - Compare default target selection with the current active target set. - Validate critical services/workloads represented by the target independently. |
| Verification chain | target selection → wants/requires graph → before/after ordering → systemd transaction → member-unit outcomes → target active state → workload validation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Target state proves a systemd grouping/transaction condition, not complete functional health of every service in the grouped system state. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |