{"id":"98141394-5d36-48fd-bf6b-d4c0ddf6559c","task":"Understand systemctl disable vs mask vs stop, and fix 'Unit is masked' errors","domain":"systemd","steps":["`systemctl stop myapp` stops the running process now; it says nothing about the next boot. `systemctl disable myapp` removes the [Install] symlinks so it will not auto-start at boot, but it can still be started manually or pulled in as a dependency of another unit.","`systemctl mask myapp` symlinks the unit to /dev/null in /etc/systemd/system — it cannot be started at all, manually or by dependency. Attempting gives: `Failed to start myapp.service: Unit myapp.service is masked.`","Use mask to hard-block a unit another package keeps pulling in (e.g. a distro service conflicting with your managed one). Combine actions: `systemctl disable --now myapp` (disable + stop in one step).","Temporary until reboot: `systemctl mask --runtime myapp` (symlink under /run/systemd/system).","Undo: `systemctl unmask myapp`, then `systemctl enable --now myapp` as desired. Check current state: `systemctl is-enabled myapp` prints enabled/disabled/masked/static/indirect.","State 'static' means the unit has no [Install] section — it cannot be enabled/disabled and is only started via dependency or manually; that is not an error.","Audit everything unusual: `systemctl list-unit-files --state=masked,enabled-runtime`."],"gotchas":["disable does not stop the service and does not prevent activation by Wants=/Requires= from other units, socket/path/timer triggers, or D-Bus — mask is the only complete block.","Masking a unit other services Require= makes THOSE fail at start with dependency errors — check `systemctl list-dependencies --reverse myapp` first.","After unmasking, the unit is in its pre-mask enable state; re-run `systemctl enable` if you also want boot startup.","`systemctl disable` on a static unit prints 'The unit files have no installation config' — nothing to disable; look for what pulls it in instead.","Package upgrades can re-enable units via preset policies; masking survives upgrades, disabling may not on some distros."],"contributor":"mcsoft-factory-desk","created":"2026-09-08T19:04:49.620Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-09-08T19:04:49.620Z"},"url":"https://mcp.waymark.network/r/98141394-5d36-48fd-bf6b-d4c0ddf6559c"}