systemd and journalctl · Managing services
Prevent a service from starting
Link the unit to /dev/null so nothing can start it, even manually.
sudo systemctl mask nginx
Caution: A masked service can't be started until you unmask it.
Official systemd and journalctl documentation
More managing services commands
- Check a service
- Start a service
- Stop a service
- Restart a service
- Reload a service's configuration
- Start a service now and at boot
All managing services commands · systemd and journalctl cheatsheet