Home / Localhost / systemctl commands

systemctl commands: start, stop, restart, enable, status

The systemctl commands you use most, what each really does, and the difference between restart, reload, enable and daemon-reload.

systemctl controls services on Linux systems that use systemd. Most confusion comes from a few pairs: start and enable, restart and reload, daemon-reload and reload. Each pair does something different.

The commands you need most

  1. Put sudo in front when you manage system services.
  2. Replace myapp with your service name (the .service ending is optional).
  3. Check with status after every change.
  4. Read the log with journalctl -u myapp -n 50 if it fails.

Commands you can copy

Start now
sudo systemctl start myapp
Stop now
sudo systemctl stop myapp
Stop then start
sudo systemctl restart myapp
Reload its own config
sudo systemctl reload myapp
Show status and recent log
systemctl status myapp
Start at boot
sudo systemctl enable myapp
Enable and start now
sudo systemctl enable --now myapp
Do not start at boot
sudo systemctl disable myapp
After editing a unit file
sudo systemctl daemon-reload
List failed units
systemctl list-units --failed
Is it running (exit code)
systemctl is-active myapp

What each command really does

start vs enable
start runs it now. enable creates the links so it starts at boot, but does not start it. enable --now does both. disable undoes enable but does not stop it; add --now to stop it too.
restart vs reload
restart stops then starts the service, and starts it if it was not running. reload asks the service to reread its own configuration, such as nginx rereading nginx.conf. It does not reload the systemd unit file.
daemon-reload
Run it after you edit a .service file. It reruns generators, reloads all unit files and rebuilds the dependency tree. It does not reload any service’s own configuration. Our systemd service generator builds the file.
mask
systemctl mask myapp links the unit to /dev/null so nothing, even a manual start, can run it. Undo it with unmask. It fails if a unit file already exists in /etc/systemd/system.
Exit codes in scripts
is-active exits 0 if at least one named unit is active. is-enabled exits 0 for enabled, static, alias and indirect, above 0 for disabled and masked, and 4 for not found.
User services
Add --user to talk to your own service manager instead of the system one. No sudo is needed.
It fails to start
Run systemctl status myapp and journalctl -u myapp -n 50. Common causes are a wrong path in ExecStart (status 203/EXEC) or a missing user (217/USER); the systemd service generator page lists these.

Questions about systemctl commands

What is the difference between systemctl restart and reload?
Restart stops and starts the process. Reload asks it to reread its config without stopping, if the service supports it. Not every service does.
Does systemctl enable start the service?
No. It only sets it to start at boot. Use enable --now to also start it.
Why does my edited service file have no effect?
systemd needs sudo systemctl daemon-reload after you change a unit file, then a restart of the service.
How do I see why a service failed?
systemctl status shows the last log lines, and journalctl -u name shows more.

Updated 2026-10-24

Config generators for this

Related pages