JuniorLinux

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

All 336 cloud engineer questions

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