Linux · Systems fluency

How do you manage services with systemctl?

MediumsystemctlservicesunitsUpdated Oct 2026
Quiz this track

Short answer

Use systemctl start, stop, restart, reload, enable, and disable to manage units. start changes the current state, while enable controls whether the unit starts automatically at boot.

A unit file describes what to run, which user to run as, dependencies, restart policy, and sandboxing. Vendor units live under /usr/lib/systemd/system; local units and overrides belong under /etc/systemd/system.

sh
systemctl cat nginx
systemctl enable --now nginx
systemctl restart nginx
systemctl is-enabled nginx

State versus boot policy

  • start and stop affect the current runtime state
  • enable and disable create or remove boot-time symlinks
  • reload asks the service to reread configuration without a full restart
  • daemon-reload tells systemd to reread unit files after you edit them
  • mask prevents a unit from being started even as a dependency

Prefer drop-in overrides under a .d directory over editing vendor unit files. Drop-ins survive package upgrades and make the local change explicit. Run systemctl daemon-reload after changing any unit file.

If a service starts manually but not at boot, check enablement, dependencies, ordering, and whether the unit expects a network or filesystem that is not ready yet.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What is the difference between enable and start?
  2. 2Why do you need systemctl daemon-reload?
  3. 3How do you override part of a vendor unit file?
  4. 4What does masking a service do?

Say it in the interview

systemctl manages both the current state and boot policy. start and stop affect runtime, while enable and disable control whether the unit comes up at boot. I use drop-in overrides instead of editing vendor unit files, and I run daemon-reload after any change. If a service works manually but not at boot, I check dependencies and ordering.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Linux mock interview and get scored feedback on depth, clarity and confidence.