Interview Prep/Linux/Processes, services and systemd

You need to stop a service from being started by anyone, even as a dependency, during an investigation. How?

BeginnerScenarioProcesses, services and systemd
Answer

Situation read → disable isn't enough; use mask.

What I'd do →

sudo systemctl stop cups
sudo systemctl mask cups
systemctl status cups     # shows "masked"
# later
sudo systemctl unmask cups

Why → Mask links the unit to /dev/null, so neither manual starts nor dependencies can activate it. disable only removes boot-time links.

Interview tip → Remember to mask the .socket too for socket-activated services.

All Linux questions Roadmap: Linux

More on Processes, services and systemd