A service installed on Linux and then started with systemctl start runs fine until the next reboot, when it does not come back. A service only enabled with systemctl enable comes back after a reboot but sits idle until then. The two commands answer different questions. start is about right now. enable is about the next boot. The tests below used systemd 255 on Ubuntu 24.04, run against an offline directory tree with --root, which shows exactly what enable writes to disk.
Two questions, four combinations
Now and at boot
The systemd manual describes start as the command to start (activate) one or more units given on the command line. Its description of enable adds a line that settles most confusion: enabling “does not have the effect of also starting any of the units being enabled.”
Those two independent switches give four states:
| Started | Not started | |
|---|---|---|
| Enabled | Running now and after reboot | Idle now, starts at next boot |
| Not enabled | Running now, gone after reboot | Off now and after reboot |
The top-left box is what most people want when they install a service. It takes both commands, or one command with a flag.
–now
The manual’s answer to the two-command problem is a flag. Used with enable, disable, mask or reenable, --now will also start, stop or try-restart the units after the unit file operations succeed. So enable --now enables the unit and starts it in one step, and disable --now disables and stops it. The order matters: the file change happens first, and the start or stop only follows if it worked. For a newly installed service the usual line is:
sudo systemctl enable --now myapp.service

What enable writes to disk
A unit file to test with
The --root option points systemctl at a directory tree instead of the running system. The manual says that with it, systemctl will operate on the file system directly instead of talking to the systemd daemon, so enable can be watched without a live systemd. A minimal unit file in that tree:
[Unit]
Description=My app
[Service]
ExecStart=/usr/bin/sleep infinity
[Install]
WantedBy=multi-user.target
The symlink
Before enabling:
$ systemctl --root=$R is-enabled myapp.service
disabled
The exit status was 1. Then:
$ systemctl --root=$R enable myapp.service
Created symlink .../etc/systemd/system/multi-user.target.wants/myapp.service → /etc/systemd/system/myapp.service.
That is all enable did: one symbolic link. The manual describes the command as creating a set of symlinks, as encoded in the [Install] sections of the unit files. WantedBy=multi-user.target turned into a link inside a directory called multi-user.target.wants. When the system boots and reaches the multi-user target, systemd looks in that directory and starts everything linked there.
Nothing ran. The service was not started, no process existed, and is-enabled now said enabled.
Disable removes it
$ systemctl --root=$R disable myapp.service
Removed ".../etc/systemd/system/multi-user.target.wants/myapp.service".
The link count in the tree went back to zero. The manual notes that disable removes those links and does not stop the unit, the mirror image of enable not starting it.
When enable refuses: static units
No [Install] section
The same unit file with its [Install] section deleted produced a long explanation instead of a symlink:
$ systemctl --root=$R enable noinstall.service
The unit files have no installation config (WantedBy=, RequiredBy=, UpheldBy=,
Also=, or Alias= settings in the [Install] section, and DefaultInstance= for
template units). This means they are not meant to be enabled or disabled using systemctl.
The command exited 0 anyway, which makes the message easy to miss in a script. Afterwards:
$ systemctl --root=$R is-enabled noinstall.service
static
The manual defines static: the unit file is not enabled and has no provisions for enabling in the [Install] unit file section. Such units can still be started by hand. They are meant to be pulled in by something else.
Why a unit would be static
systemd’s own message lists the reasons. A static unit may be linked from another unit’s .wants/ or .requires/ directory, may exist as a helper that another unit depends on, or may be started on demand by a socket, path, timer, D-Bus call or udev event. Many units that ship with a distribution are static for exactly these reasons. A unit someone writes for their own program usually is not meant to be, and a missing [Install] section is the usual cause when enable seems to do nothing.
Other [Install] lines, other links
WantedBy= is the common case but not the only one. A second test tree held three more units and enabled each:
| [Install] line | Link enable created |
|---|---|
WantedBy=multi-user.target |
multi-user.target.wants/myapp.service |
RequiredBy=multi-user.target |
multi-user.target.requires/needed.service |
Alias=webapp.service |
webapp.service, pointing at myapp.service |
WantedBy=timers.target (in a .timer unit) |
timers.target.wants/backup.timer |
The directory name carries the strength of the dependency: .wants asks for the unit to be started, .requires makes the target depend on it. The alias gave the unit a second name, and is-enabled webapp then answered alias.
The timer case is the one that trips people up. The service it runs, backup.service, has no [Install] section and reports static. That is correct: the timer is what gets enabled, and the timer starts the service on schedule. Enabling the service instead would have done nothing. systemctl list-unit-files showed the whole picture at once:
UNIT FILE STATE PRESET
backup.service static -
myapp.service enabled enabled
needed.service enabled enabled
webapp.service alias -
backup.timer enabled enabled

is-enabled and is-active
The two status checks
The two questions from the start each have a status command:
| Command | Question | Exit 0 when |
|---|---|---|
systemctl is-enabled myapp |
Will it start at boot? | The unit is enabled (or an enabled-type state) |
systemctl is-active myapp |
Is it running now? | At least one listed unit is active |
The manual lists the states is-enabled can print, among them enabled, static, disabled, masked, indirect, alias and generated. Both commands print a word and set an exit code, so they work directly in scripts:
systemctl is-active --quiet myapp || systemctl start myapp
systemctl status myapp shows both answers at once, in its Loaded: line (enabled or disabled) and its Active: line (running or not).
The sandbox could not answer is-active
is-active and start need a running systemd to talk to. In the test environment, which is a container where systemd is not process 1, both failed with:
System has not been booted with systemd as init system (PID 1). Can't operate.
enable --now there created the symlink and then hit the same error when it tried to start the service. That split is the clearest demonstration available of the two halves of the command: one half edits files, the other half talks to the running service manager.
Stronger and weaker: mask, restart, reload
mask
disable only removes the boot-time links. Anything can still start the unit by hand or as a dependency. mask blocks it completely: the manual says it links the unit file to /dev/null, making it impossible to start them. It is the tool for a service that must never run, such as a second time daemon that would fight the first.
The test turned up a limit. Masking the test unit failed:
$ systemctl --root=$R mask myapp.service
Failed to mask unit, file ".../etc/systemd/system/myapp.service" already exists.
Masking works by placing the /dev/null link in /etc/systemd/system, and this unit’s own file already occupied that name. Units installed by packages live elsewhere, under /usr/lib/systemd/system, so they mask cleanly; a hand-written unit in /etc/systemd/system has to be disabled, or moved, instead.
reenable and preset
Two less-used commands repair the boot-time links. reenable, in the manual’s words, is a combination of disable and enable, useful to reset the symlinks after the [Install] section has been edited, for example when a service moves from multi-user.target to graphical.target. preset resets a unit’s enabled state to the defaults in the distribution’s preset policy files, which is the PRESET column in the list-unit-files output above.
restart, reload, try-restart
The manual separates three commands that sound alike:
restartstops and then starts the unit, and starts it if it was not running.try-restartdoes the same only if the unit is already running.reloadasks the service to reload its own configuration. The manual is explicit that this reloads the service-specific configuration, not systemd’s unit file.
daemon-reload
Changing the unit file itself, adding an Environment= line or editing ExecStart=, needs a different command: systemctl daemon-reload, which makes systemd reread its unit files. The manual notes that enable, disable and edit reload automatically. A file edited in a text editor does not, and until daemon-reload runs, restart brings the service back with the old settings.

The sequence for a new service
sudo cp myapp.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now myapp.service
systemctl is-enabled myapp.service # enabled
systemctl is-active myapp.service # active
Each line answers one question: is the file in place, does systemd know about it, is it linked for boot and running now, and did both of those take.
Sources
- systemd, systemctl(1) manual page (latest), freedesktop.org: https://www.freedesktop.org/software/systemd/man/latest/systemctl.html
