Many people don’t figure out why a Systemd service can be masked. They understand the need to enable it at boot and start it but why masking it?
Back to basics, a Systemd service can be:
- manually started with the systemctl start command,
- automatically started at boot with the systemctl enable command,
- dbus-activated by another Systemd service (NetworkManager can be triggered like this),
- socket-activated by some network activities (the printer service cups is a good example).
With this in mind, it becomes clear that masking a Systemd service with the systemctl mask command makes sense for a dbus-activated or a socket-activated service because in these cases stopping or disabling won’t definitively be enough!
Conclusion: If you want to be sure that a service will not start, mask it!
Recent Comments