Interview Prep/Linux/systemd services and journald

Processes started from an SSH session (e.g. `tmux`) get killed when the user logs out on a newer distro.

AdvancedTroubleshootingsystemd services and journald
Answer

Likely causes → KillUserProcesses=yes in /etc/systemd/logind.conf kills all processes in the session scope at logout.

Diagnose →

grep -i KillUserProcesses /etc/systemd/logind.conf
loginctl show-session $XDG_SESSION_ID

Fix → Set KillUserProcesses=no (or add users to KillExcludeUsers=), restart systemd-logind carefully, or run long tasks with systemd-run --user --scope plus linger.

Prevent → Run long-lived work as services, not inside interactive sessions.

All Linux questions Roadmap: Linux

More on systemd services and journald