Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

systemd

Direct answer

systemd is the first process on a Linux system (PID 1) and the manager of everything after it: it reads unit files, works out start order, launches services and supervises each in its own control group.

When to use this

Use it when the simple commands mislead: a unit that is "running" and does nothing, a change with no effect, a service that starts too early or will not stay down.

First 30 seconds

1. systemctl cat <unit> — is the setting you expect actually in effect?

2. Not → a drop-in or a file in /etc/systemd/system overrides it; or daemon-reload is missing.

3. systemctl show <unit> -p NRestarts,ExecMainStatus — restarting? Exit code?

4. "Start request repeated too quickly" → fix the cause, then systemctl reset-failed <unit>.

5. Starts before its dependency is ready → add After= and Wants= in a drop-in.

Operational verification

unit files read (etc over run over usr/lib, plus drop-ins) → daemon-reload → dependency and order graph → start job → readiness according to Type= → supervised in a control group → restarted per Restart=

Evidence · next step

For systemd & Services → systemd, continue with the first unproven Topic check: Confirm the host/container manager context and exact unit scope. If that boundary is healthy, advance to the adjacent check: Inspect manager-reported unit load/active/sub state and relevant transaction result. 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
Common mistakes
Common interpretation traps
  • "Active (running) means the service works." It means a process exists. Test the service itself — its port, its response.
  • "Enabled means running." Enabled only means it will be started at boot.
  • "I edited the unit file, so the change applies." Not until systemctl daemon-reload and a restart.
  • "After= makes the other unit start." It only orders; Wants= or Requires= pulls the unit in.
  • "The unit file in /usr/lib is what runs." A file or drop-in under /etc/systemd/system may override it; check with systemctl cat.
  • "The service is failed, so start it again." Read systemctl status and the journal first; after repeated failures it also needs systemctl reset-failed.
  • "Killing the main process stops the service." With Restart= set, systemd starts it again.
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 · Linux · distribution/version specific
Key commandsystemctl status <unit>
Scope / prerequisiteUse it when the simple commands mislead: a unit that is "running" and does nothing, a change with no effect, a service …
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

9 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

systemd manager context → unit load → dependency transaction → activation job → cgroup/process supervision → active/sub state → readiness → consumer result

Healthy evidence: the manager has the intended effective unit configuration, transaction completes, supervised processes match intent and the service passes its acceptance test.

Step 2 Operational verification Verify boundary

Unit state, dependencies, start/stop/restart behavior, enablement and systemd troubleshooting.

Fast verification

  • Inspect systemctl status, systemctl show and systemctl cat for effective unit state and configuration.

- Use systemctl list-dependencies when ordering or dependency failures are suspected.

- Read the unit journal before editing override files; daemon-reload is required after unit definition changes.

Step 3 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Confirm the host/container manager context and exact unit scope.

  • Inspect manager-reported unit load/active/sub state and relevant transaction result.
  • Compare loaded properties/drop-ins with files on disk when configuration changed.
  • Verify application readiness and dependent workload separately from systemd state.

Verification chain. systemd manager context → unit load → dependency transaction → activation job → cgroup/process supervision → active/sub state → readiness → consumer result

Step 4 Specialized verification Verify boundary

Inspect the unit’s load state, active/sub state, fragment/drop-in paths and cgroup/MainPID. Use the effective unit view to show which configuration systemd loaded, then correlate job/dependency state and journal records to the transition. For service correctness, continue beyond “active” to the application’s listener, readiness or original workload. After a unit-file edit, verify that daemon-reload occurred and that the relevant restart/reload transition actually consumed the new service configuration.

Step 5 Commands Verify boundary
systemctl --version
systemctl list-units --type=service --state=running
Step 6 Common mistakes Narrow the fault
  • Using SysV init scripts on systemd systems.
Step 7 Failure modes and next checks Narrow the fault

Suspicious evidence: PID 1 or active state is treated as sufficient evidence while the service is not ready or loaded configuration is stale.

systemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency health.

Step 8 Special cases and limits Narrow the fault

systemd can successfully supervise a process that is functionally unhealthy, and a failed unit can reflect an application exit rather than a PID 1 defect. Unit dependencies express manager relationships, not necessarily application-level dependencies. A process outside the expected unit cgroup may indicate manual launch or delegation. Do not infer persistence from current active state or current success from enablement. Separate manager configuration, unit lifecycle, process state and workload behavior.

Step 9 Where it fails Narrow the fault

Walk persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check and stop where observed state diverges.

Also consider stale generated config, wrong environment, wrong namespace/chroot/container, package/provider mismatch, dependency ordering, immutable/read-only mounts, exhausted inode/block resources, capabilities, SELinux/AppArmor denial, systemd sandboxing, cgroup limits and boot-time state that differs from the interactive shell.

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

A unit in /etc/systemd/system or a drop-in overrides the packaged one. With the default Type=simple, "started" only means the process was launched. After= orders; Wants=/Requires= pulls a unit in. A service that fails repeatedly hits a start limit.

Key checks
  • systemctl cat <unit> — the effective unit with all drop-ins.
  • systemctl show <unit> -p Type,Restart,ExecMainStatus,NRestarts — key properties.
  • systemctl list-dependencies <unit> — what it pulls in.
  • systemd-analyze verify <unit file> — syntax and reference errors.
  • systemd-analyze critical-chain <unit> — what it waited for at boot.
ReferenceWhat it is2 sections · depth on demand

Core model

Treat systemd as a manager with its own loaded configuration and runtime state. Identify manager version/context, the exact unit transaction, dependency graph and cgroup/process outcome. PID 1 being alive shows the manager exists, not that a specific unit or workload is healthy.

Mental model

systemd is the first process started by the Linux kernel (PID 1) and the manager of everything that runs after it. It reads unit files, works out the order in which things must start, launches them in parallel where possible, and supervises each service in its own control group.

ReferenceWhy it matters3 sections · depth on demand

When to use it

Use this Topic when the problem is in systemd. Use System & Service Management when the problem concerns Linux runtime, services, networking, identity, packages, storage or shell automation.

Why it matters operationally

Understanding how systemd itself decides — which unit file wins, what "active" really means, how a service's start-up type affects what systemd believes — explains the cases where the simple commands mislead: a service reported as running that does nothing, a change that has no effect, a unit that starts too early.

Quality lift: concrete internals

systemd quality lift — inspect the concrete systemd unit and service lifecycle mechanics rather than treating existing coverage as completion. systemd resolves unit files/drop-ins, dependencies/order, conditions and environment, then forks/execs or activates the service and tracks its main process/readiness according to Type.

ReferenceHow it works1 section · depth on demand

How it works

Unit types. .service (a process), .socket (a listening socket that starts its service on demand), .timer (scheduled activation, the modern cron), .mount and .automount, .target (a named group or milestone), .path (start when a file changes) and .slice (a resource group).

Where unit files come from, highest priority first:

LocationPurpose
/etc/systemd/systemThe administrator's units and overrides
/run/systemd/systemRuntime units, gone at reboot
/usr/lib/systemd/systemUnits shipped by packages

A file in /etc with the same name replaces the packaged one entirely. A drop-in — /etc/systemd/system/<unit>.d/*.conf — changes single settings and is the better tool. systemctl cat <unit> shows the effective result.

States. Each unit has a load state (was the file read successfully), an active state (active, inactive, failed, activating) and a sub-state (running, exited, dead…). "Active (exited)" is normal for a one-shot unit that did its job.

How systemd knows a service is up depends on Type=:

TypeConsidered started when
simple (default)The process has been launched — nothing more
forkingThe initial process has exited, leaving a daemon behind
notifyThe service tells systemd it is ready
oneshotThe command has finished

With simple, "active (running)" only means the process exists; it may still be initialising or stuck.

Supervision. Every service runs in its own control group, so systemd knows all its processes and can stop them all. Restart=on-failure makes systemd start a service again when it exits abnormally; a service that keeps failing hits a start limit and stays down until reset with systemctl reset-failed.

Loading changes. systemd holds unit files in memory. After any edit, systemctl daemon-reload makes it re-read them; running services keep their old settings until restarted.

ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

systemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency health.

In depth

systemd as PID 1

When systemd runs as the first process at boot, it's the init system: it starts and supervises everything in userspace. The systemd(1) manual page describes the core concepts:

  • Units: services, sockets, mounts, timers and more.
  • States: active, inactive, failed, activating, deactivating, reloading, plus maintenance and refreshing.
  • cgroups: systemd places every process in a control group named after its unit. It always knows which processes belong to which service, even after daemons fork.

The kernel command line can choose another target. systemd.unit=rescue.target, or the shortcuts rescue, single and 1, boot into rescue mode. emergency boots into emergency mode, and 3 is equivalent to multi-user.target.

Unit states (manual)

StateMeaning
activeStarted (or bound, plugged, mounted, depending on the unit type)
inactiveStopped
failedStopped after a failure: non-zero exit, crash, timeout or too many restarts
activating / deactivatingIn transition
reloadingActive and reloading its configuration

What systemd replaces

Older mechanismsystemd equivalent
SysV init scripts in /etc/init.dService units
RunlevelsTargets
cron (partly)Timer units
inetdSocket units
/etc/fstab handling at bootMount units generated from fstab
Separate log daemonsjournald (often alongside rsyslog)

Inspecting processes by unit

host$ systemctl status sshd --no-pager | sed -n '1,4p;/CGroup/,$p'
host$ systemd-cgls --no-pager -u nginx.service
Unit nginx.service (/system.slice/nginx.service):
├─1203 "nginx: master process /usr/sbin/nginx"
├─1204 "nginx: worker process"
└─1205 "nginx: worker process"
host$ ps -eo pid,user,cgroup:40,args | grep -m3 nginx
host$ systemd-analyze blame | head -5
host$ systemctl list-jobs

Re-executing the manager

The manual notes that SIGTERM to systemd as the system manager makes it serialise its state, re-execute itself and restore that state. That's mostly equivalent to systemctl daemon-reexec, which package upgrades of systemd itself use. A plain daemon-reload only re-reads unit files.

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

systemd is part of systemd & Services → systemd. systemd is the Linux system and service manager commonly running as PID 1, responsible for unit loading, dependency transactions, service supervision, sockets/timers, cgroup placement and lifecycle coordination.

Runtime state ownership and mechanics. Processes have PID/TID identity, parentage, credentials, namespaces, cgroups, open files, memory mappings, scheduling state and signal disposition. systemd adds unit state, dependency ordering, cgroup ownership, restart policy and activation semantics above the raw process model.

Topic-specific state model. systemd is the Linux system and service manager commonly running as PID 1, responsible for unit loading, dependency transactions, service supervision, sockets/timers, cgroup placement and lifecycle coordination.

Technical metadata. Host/container, boot/session context, timestamp, PID namespace, PID/PPID + start time, executable/cmdline, process state, credentials, cgroup, canonical unit name/type, fragment path + drop-ins, load/unit-file state, requirement and ordering edges, systemd job result, MainPID/control process, active/sub/result state, journal correlation, readiness probe, original workload result.

Interpretation rule. - systemd PID 1 alive ≠ every managed unit is healthy.

  • Manager job accepted ≠ service initialization completed successfully.
  • On-disk unit definition ≠ currently loaded manager definition.
  • Service process exists ≠ service contract is ready.

Specialized mechanics

systemd as PID 1 manages units, jobs, dependency ordering, cgroups and activation sources. The manager’s loaded unit model is distinct from the files currently present on disk, and a unit’s “active” state is distinct from application readiness. Jobs transition units according to dependency and ordering rules while cgroups provide process ownership that survives simple PID-parent assumptions. Socket, path, timer and device activation can start services indirectly, so the process that appears later may be the result of another unit’s activation semantics.

Mechanics

Follow the path in order: persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check.

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. systemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency health.

Model. PID existence does not show health, and a dead MainPID can be expected for oneshot units. “enabled” does not mean running, “active” does not mean enabled, and daemon-reload does not apply daemon configuration. systemd dependency ordering is not necessarily a readiness guarantee unless the service protocol/unit design provides one.

ReferenceConfiguration & state3 sections · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. For systemd-managed workloads, the unit plus drop-ins and generators form persistent intent; daemon-specific configuration remains a separate layer. enablement controls boot/target linkage and is distinct from current active state. daemon-reload refreshes systemd’s unit model but does not restart services.

Specialized lifecycle

Vendor unit files, administrator overrides, drop-ins, aliases, presets and generators participate in the effective configuration. Prefer drop-ins under /etc for local changes and use daemon-reload when unit files or generated unit metadata must be re-read. daemon-reload does not restart services; enablement does not start a unit; restart is not the same as reload. Before altering dependencies, distinguish requirement relationships from ordering because Wants/Requires and After/Before solve different problems.

Lifecycle

systemd generators and drop-ins, package scripts, udev, mount helpers, netlink, resolver caches, namespaces, SELinux/AppArmor policy and kernel drivers can make runtime state differ from the file or command that appears to own it.

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 → systemd. 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: PID 1 manager role, unit lifecycle and boot/service ownership. 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/man1/systemd.1.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 linuxlinux pid 1systemd managersystemd architecture
Embedded reference data

Quick lookup tables

systemd operational reference

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

Lookup boundaryTopic-specific referenceOperational use
Scope / effective statesystemd is the Linux system and service manager commonly running as PID 1, responsible for unit loading, dependency transactions, service supervision, sockets/timers, cgroup placement and lifecycle coordination.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 chainsystemd manager context → unit load → dependency transaction → activation job → cgroup/process supervision → active/sub state → readiness → consumer resultTrace requested/configured state through effective state to the observed workload result.
Failure boundarysystemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency 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: systemd manager context → unit load → dependency transaction → activation job → cgroup/process supervision → active/sub state → readiness → consumer 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. systemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency 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.

systemd · operational reference

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

Reference boundarysystemd
Topic pathsystemd & Services → systemd
Runtime statesystemd is the Linux system and service manager commonly running as PID 1, responsible for unit loading, dependency transactions, service supervision, sockets/timers, cgroup placement and lifecycle coordination.
Fast checks- Confirm the host/container manager context and exact unit scope. - Inspect manager-reported unit load/active/sub state and relevant transaction result. - Compare loaded properties/drop-ins with files on disk when configuration changed. - Verify application readiness and dependent workload separately from systemd state.
Verification chainsystemd manager context → unit load → dependency transaction → activation job → cgroup/process supervision → active/sub state → readiness → consumer result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundarysystemd evidence establishes manager decisions and supervised state, not complete application correctness or external dependency 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.

systemd · specialized operational reference

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

Operational boundaryTopic-specific reference
Manager stateLoaded unit model + jobs + cgroups
Persistent intentVendor file + /etc drop-ins + enablement links
Reload boundarydaemon-reload refreshes units; service reload/restart is separate
ProofUnit/cgroup state plus application-visible success
Confirmation

Confirm action

Continue?