A systemd service will not start. How do you investigate?
What they are really testing: Whether you know the modern systemd toolchain (systemctl, journalctl) and read the actual error instead of guessing. This is daily cloud-ops work.
A real interview question
A systemd service will not start. How do you investigate?
What most people say
drag me
“I would restart the service a few times and reboot the server if it keeps failing.”
Restart-and-reboot ignores the error message systemd already gives you. A failing unit fails deterministically; rebooting wastes time and hides the cause.
The follow-ups they ask next
The service starts then immediately exits and systemd keeps restarting it. What do you check?
A crash loop: journalctl shows the repeated error; check the exit code, Restart= policy, and whether a dependency (DB, mount, network) is not ready, you may need After=/Requires= or a readiness wait.
How do you make a service start on boot?
systemctl enable <svc> (creates the boot symlink); enable --now both enables and starts it. status shows "enabled" vs "disabled".
What the interviewer is listening for
- Goes to status + journalctl first
- Reads the actual error
- Knows daemon-reload after edits
- Reproduces ExecStart manually
What sinks the answer
- Restart/reboot without reading logs
- Doesn't know journalctl -u
- Forgets daemon-reload
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“I check [systemctl status for state + exit code], then [journalctl -u for the real error], inspect [systemctl cat for ExecStart/user/deps], and if needed [run ExecStart by hand as the service user]. After unit edits I [daemon-reload then restart].”
Keep going with linux
Foundation
Explain Linux file permissions. What does chmod 644 mean, and what would 755 be for?
Foundation
How do you find a running process and stop it? What is the difference between SIGTERM and SIGKILL?
Foundation
Explain PATH, environment variables, and how pipes and redirection work in the shell.
Junior
A server reports the disk is full. Walk me through finding what is using the space.
Junior
How do you check what is listening on a port, and test whether you can reach a remote service?
Mid
A Linux box is sluggish and load is high. Walk me through finding the cause.
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free