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

All managing services commands · systemd and journalctl cheatsheet

Was this page helpful?