Prevent a unit from being started.
Section: Enable, Disable, Mask
Mask a service
bash
bash
sudo systemctl mask nginxExplanation
Strongest disable. Even manual starts are blocked.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Enable, Disable, Mask