Use systemctl to start, stop, restart and check a service, and enable it so it starts at boot. When something fails, systemctl status shows the state, recent log lines and the exit code, and journalctl for that unit gives the full logs. Check the unit file for the command, user, environment and dependencies, use drop in overrides rather than editing vendor files, and reload the daemon after changes.
Why interviewers ask this
Almost every modern Linux distribution uses systemd, so managing services is a daily task. The interviewer wants the core commands, a sensible troubleshooting path through status and the journal, and an understanding of unit files. Knowing to use drop in overrides instead of editing packaged unit files, how restart policies work, and that a service can be running but unhealthy, shows you have done this in production.
How to structure your answer
- Cover the everyday systemctl commands.
- Describe troubleshooting with status and journalctl.
- Explain unit files, overrides and daemon reloads.
- Mention restart policies and checking real health.
Example answer
Day to day it is systemctl: start, stop, restart and status, plus enable so the service starts at boot. When a service fails, systemctl status is my first stop, because it shows whether it is active or failed, the main process, the exit code and the last few log lines. For more detail I use journalctl for that unit, often limited to the current boot, and follow it live while I restart. If the logs are not clear, I read the unit file to check the command, the user it runs as, its environment and its dependencies. A very common failure is a service that works when run by hand as root but fails under its own service user because of file permissions. To change a packaged unit I use systemctl edit to create an override rather than editing the vendor file, so upgrades do not wipe my change, then reload the daemon. I also set a restart policy for services that should recover from crashes, remembering that running is not the same as healthy, so monitoring checks the actual endpoint.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What is the difference between restarting and reloading a service?
- How would you make a service start only after the network is available?
- How would you replace a cron job with a systemd timer?
Related systems administrator questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions