Interview Prep/Linux/Processes, services and systemd

You have to schedule a maintenance reboot of a host but want running services to stop cleanly in the right order. How?

BeginnerScenarioProcesses, services and systemd
Answer

Situation read → Use systemd shutdown, not a hard reset.

What I'd do →

sudo shutdown -r 02:00 "Kernel patching"
# check / cancel
shutdown --show 2>/dev/null; sudo shutdown -c

Drain the host from load balancers first, and make sure units have correct After= ordering, since systemd stops units in reverse start order.

Why → A clean shutdown runs ExecStop and lets databases flush.

Interview tip → Mention draining traffic before rebooting; that's what separates ops from just commands.

All Linux questions Roadmap: Linux

More on Processes, services and systemd