Systemd includes a feature that can terminate user processes when a user logs out. This functionality is controlled by the `KillUserProcesses` option within the `/etc/systemd/logind.conf` configuration file for `systemd-logind`. In recent Debian releases, this option is disabled by default, allowing user processes to continue running after logout.
Contrary to a common belief, the "linger" feature is not necessary for applications like screen, tmux, or nohup to persist after a user logs out in Debian's default setup. While some specific configurations might require it, the primary effect of "linger" on a default Debian system is to allow programs to start in the user's session even when the user is not logged in.
If `KillUserProcesses` is enabled, systemd can be configured to kill processes for specific users or exclude others, such as the root user. A systemd unit can also be used to start applications like screen, preventing them from being terminated upon logout even when `KillUserProcesses` is active. This feature can be useful for managing misbehaving desktop environments by ensuring all user processes are cleared on logout.
Users can enable or disable the "linger" feature for their own accounts using the commands `loginctl enable-linger` and `loginctl disable-linger`, provided `polkit` is installed and configured typically. Root users can manage linger for other accounts with `loginctl enable-linger $ACCOUNT` and `loginctl disable-linger $ACCOUNT`. There is no documented command to list accounts with linger enabled; checking `ls /var/lib/systemd/linger` is the current method.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
The systemd "linger" feature, often misunderstood as necessary for screen/tmux/nohup to persist after logout, is not required for this functionality in Debian's default configuration. The article clarifies how systemd-logind's KillUserProcesses option and the linger feature interact, and how to manage linger for user accounts. This information helps users understand systemd behavior regarding process persistence and manage it effectively.