Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

enable / disable

Direct answer

systemctl enable creates the symlinks that start a unit at boot (from its [Install] section); disable removes them. --now also starts or stops it immediately. mask prevents it from starting at all.

When to use this

Use it when a service does not start after reboot, or starts when it should not.

First 30 seconds

1. systemctl is-enabled <unit> — enabled, disabled, static or masked?

2. systemctl is-active <unit> — running now?

3. Enable and start: systemctl enable --now <unit>.

4. Masked → systemctl unmask <unit>.

5. Reboot test (or systemctl list-dependencies multi-user.target).

Operational verification

enable → symlink in the target's .wants directory → target reached at boot → unit started

Evidence · next step

For systemd & Services → enable / disable, continue with the first unproven Topic check: Capture current unit-file state and installation target relationships. If that boundary is healthy, advance to the adjacent check: Inspect [Install] intent and resulting symlinks/dependency links for the exact unit. 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 does not start after reboot, or starts when it should not.
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.

5 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 [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verification

Healthy evidence: persistent activation state matches intent, current runtime is understood separately and controlled boot/trigger tests activate the expected service.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Capture current unit-file state and installation target relationships.

  • Inspect [Install] intent and resulting symlinks/dependency links for the exact unit.
  • Check current active/sub state separately from enablement.
  • Validate next-boot or activation behavior in a controlled way when persistence is the goal.

Verification chain. unit [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verification

Step 3 Commands Verify boundary
systemctl enable --now app
systemctl is-enabled app
systemctl disable app
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: an enabled unit is assumed to be running or a disabled unit is assumed to be stopped.

Enablement state shows persistent systemd activation configuration, not current process state or application health.

Step 5 Common mistakes Narrow the fault
  • Enabling but not starting (or the reverse).
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

Enabled is not the same as running: check both is-enabled and is-active. A unit without an [Install] section is "static" and starts only as a dependency.

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

Separate persistence intent from runtime state. Verify whether a unit is enabled, disabled, static, masked, indirect or otherwise install-state constrained, then inspect the actual wants/requires links. Enabling normally affects future activation paths; starting the service is a separate operation unless an explicit combined action is requested.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Enablement state shows persistent systemd activation configuration, not current process state or application health.

enable / disable owns persistent unit activation relationships. start/stop/restart owns current lifecycle; Boot Process owns broader boot flow.

In depth

enable, disable, mask and the enablement states

Enabling a unit doesn't start it. It creates symlinks so that the unit is pulled in at boot, based on its [Install] section. The systemctl(1) manual page describes the commands:

  • enable creates the symlinks, and disable removes them. Neither starts or stops the unit unless --now is given.
  • mask links the unit to /dev/null, so it can't be started at all, manually or as a dependency. unmask reverses it.
  • is-enabled prints the unit's enablement state. It returns 0 for enabled, static, indirect, generated, alias and transient units, and non-zero for disabled, masked, linked and bad ones.

Enablement states

StateMeaning
enabledSymlinks exist; started at boot
disabledHas an [Install] section, but isn't enabled
staticNo [Install] section; only starts as a dependency of something else
indirectEnabled through another unit (e.g. Also=)
generatedCreated by a generator (e.g. from fstab)
maskedLinked to /dev/null; can't start
aliasA name for another unit

What enable actually does

WantedBy=multi-user.target turns into a symlink in /etc/systemd/system/multi-user.target.wants/. The output of enable shows the exact links created, which is useful when a unit "is enabled but doesn't start".

host$ sudo systemctl enable --now chronyd
Created symlink /etc/systemd/system/multi-user.target.wants/chronyd.service → /usr/lib/systemd/system/chronyd.service.
host$ systemctl is-enabled chronyd systemd-journald ntpd
enabled
static
masked
host$ sudo systemctl mask ntpd
Created symlink /etc/systemd/system/ntpd.service → /dev/null.
host$ sudo systemctl start ntpd
Failed to start ntpd.service: Unit ntpd.service is masked.
host$ systemctl list-unit-files --state=masked --no-legend
host$ sudo systemctl disable --now cups.socket cups.service

disable vs mask

GoalCommand
Don't start at boot, but allow manual or dependency startsdisable
Never start under any circumstances (e.g. two conflicting time daemons)mask

Socket-activated services can start again on the first connection even when the service is disabled. Disable the .socket unit too, as in the last example.

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

enable / disable is part of systemd & Services → enable / disable. enable and disable manage boot/activation relationships for unit files, typically by creating or removing symlink-based installation dependencies defined by [Install]; they do not directly describe current runtime state.

Topic-specific state model. enable and disable manage boot/activation relationships for unit files, typically by creating or removing symlink-based installation dependencies defined by [Install]; they do not directly describe current runtime state.

Interpretation rule. - Enabled ≠ running.

  • Disabled ≠ stopped.
  • Static unit ≠ broken unit; it may be activated as a dependency.
  • Masked ≠ disabled; masking blocks normal activation more strongly.

Quick reference

enable creates symlinks from the [Install] section (e.g. into multi-user.target.wants/) so the unit starts at boot; it does not start it now.

systemctl enable --now app          # enable and start
systemctl disable --now app
systemctl mask app                   # link to /dev/null — cannot be started at all
systemctl unmask app
systemctl preset app                 # apply distribution default
ls -l /etc/systemd/system/multi-user.target.wants/

Static units (systemctl is-enabled → static) have no [Install] section and are started by other units or sockets. Mask services that must never run (e.g. conflicting firewall daemons).

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. Enablement state shows persistent systemd activation configuration, not current process state or application health.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. enable / disable owns persistent unit activation relationships. start/stop/restart owns current lifecycle; Boot Process owns broader boot flow.

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 → enable / disable. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://systemd.io/ · confidence 94%
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
systemctl enable disablesystemd enable serviceunit file statesystemd disabled masked
Embedded reference data

Quick lookup tables

enable / disable operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for enable / disable.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateenable and disable manage boot/activation relationships for unit files, typically by creating or removing symlink-based installation dependencies defined by [Install]; they do not directly describe current runtime state.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 [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verificationTrace requested/configured state through effective state to the observed workload result.
Failure boundaryEnablement state proves persistent systemd activation configuration, not current process state or application 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 [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verificationUse 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. Enablement state proves persistent systemd activation configuration, not current process state or application 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.

enable / disable · operational reference

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

Reference boundaryenable / disable
Topic pathsystemd & Services → enable / disable
Runtime stateenable and disable manage boot/activation relationships for unit files, typically by creating or removing symlink-based installation dependencies defined by [Install]; they do not directly describe current runtime state.
Fast checks- Capture current unit-file state and installation target relationships. - Inspect [Install] intent and resulting symlinks/dependency links for the exact unit. - Check current active/sub state separately from enablement. - Validate next-boot or activation behavior in a controlled way when persistence is the goal.
Verification chainunit [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryEnablement state proves persistent systemd activation configuration, not current process state or application 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.
Confirmation

Confirm action

Continue?