Use it when a service does not start after reboot, or starts when it should not.
enable / disable
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.
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).
enable → symlink in the target's .wants directory → target reached at boot → unit started
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
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
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 · 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.
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.
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
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:
enablecreates the symlinks, anddisableremoves them. Neither starts or stops the unit unless--nowis given.masklinks the unit to /dev/null, so it can't be started at all, manually or as a dependency.unmaskreverses it.is-enabledprints 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
| State | Meaning |
|---|---|
enabled | Symlinks exist; started at boot |
disabled | Has an [Install] section, but isn't enabled |
static | No [Install] section; only starts as a dependency of something else |
indirect | Enabled through another unit (e.g. Also=) |
generated | Created by a generator (e.g. from fstab) |
masked | Linked to /dev/null; can't start |
alias | A 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
| Goal | Command |
|---|---|
| Don't start at boot, but allow manual or dependency starts | disable |
| 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.
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).
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
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 → enable / disable. 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
enable / disable operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for enable / disable.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | 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. | 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 | unit [Install] metadata → enable/disable operation → persistent activation links → future transaction trigger → unit activation → runtime/workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Enablement 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 evidence | Correlated 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 verification | 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. 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 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. |
enable / disable · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | enable / disable |
|---|---|
| Topic path | systemd & Services → enable / disable |
| Runtime state | 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. |
| 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 chain | unit [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 boundary | Enablement 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 rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |