Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› Enable Linger
NHI Lifecycle Management

Enable Linger

← Back to Glossary
By NHI Mgmt Group Updated November 25, 2026 Domain: NHI Lifecycle Management

Enable linger is the system setting that lets a user’s services keep running after that user logs out. On Linux systems with systemd, it allows user services to start at boot and remain active without an interactive session.

What Enable Linger Changes in a Linux System

Enable linger changes how a Linux user account behaves after logout. It lets that user’s systemd services continue running without an active session, and it can allow those services to start at boot. That makes it a lifecycle and availability setting, not just a convenience toggle, because it extends when user-scoped processes are allowed to exist.

Why Linger Matters for Service Persistence

The practical effect is persistence. A user service that would normally stop when the session ends can remain active across logout, reboot, and login boundaries. This is useful for background jobs, agents, schedulers, or helper daemons that are intentionally tied to a user account but need to behave more like always-on services. It also means the service now depends on system startup behavior and user service management, not only on an interactive shell.

Because linger keeps services available outside a login session, the setting can change how operators think about ownership, uptime, and recovery. A service may look “user owned” from an administrative perspective, yet still contribute to a broader system capability that survives user logoff.

Operational Boundary Between Session and Boot

Enable linger sits at the boundary between transient user activity and system-managed execution. Without it, user services are commonly session-bound and terminate with the user’s login context. With it, systemd can treat them as longer-lived units that may be started independently of an interactive terminal. That distinction matters when diagnosing why a service is still running after logout, or why it started before anyone signed in.

In practice, linger is one of those settings that changes the trust and control boundary of the host. It does not grant new permissions by itself, but it does extend the lifetime of whatever the user service can already do. On shared systems, that can be a meaningful operational difference.

When to Use It and What It Implies

Enable linger is appropriate when a service truly needs to survive logout, such as a personal automation task, a development helper, or a user-level daemon that should start at boot. It is less appropriate when the process is only needed during an active session, because linger can leave background activity running longer than intended. The setting is therefore a design choice about service persistence, not a default requirement for user services.

For administrators, the main implication is that enabling linger should be deliberate and reviewed alongside the service’s purpose, resource use, and expected runtime. If a background service is no longer meant to be always available, linger should be reconsidered because it preserves availability beyond the user’s interactive session.

Risk and Threat Considerations

Enable linger can extend the blast radius of a compromised or over-privileged user service, because the service may keep running after logout and may start at boot. That persistence can help benign automation, but it also gives unwanted processes a longer-lived foothold and can make cleanup harder if the service is abused or misconfigured.

Failure mechanism: A user-scoped service remains active after session end, so an attacker who abuses that service can retain execution without depending on a live login session.

Impact: The host may continue running unauthorized or excessive background activity, and responders may have to inspect both the user session and the boot-time user service state to fully remove it.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeEnable linger extends the runtime of user-scoped service activity.
IA-5 — Authenticator ManagementUser services that persist beyond logout still rely on managed credentials and secrets.
CM-6 — Configuration SettingsLinger is a host configuration that changes service persistence behavior.
Recommendation — Limit linger-enabled services to the minimum access and runtime they need. Rotate and govern the credentials used by always-on user services. Track linger as a controlled configuration and review it during system hardening.
CIS Controls v8CIS-5 — Account ManagementLinger is tied to user accounts that can keep services running after logout.
Recommendation — Review which accounts are allowed to keep persistent user services active.

Practitioner Guidance

Why practitioners should care: Enable linger should be treated as an intentional runtime decision. If the setting is used for legitimate always-on user services, document the owner, purpose, and expected lifetime so the service does not become an unnoticed persistence mechanism.

What to watch for: Review linger-enabled accounts when a user service unexpectedly survives logout, starts at boot, or continues consuming resources after the user should no longer have an active session. That behavior is often the clearest signal that the setting is doing exactly what it was designed to do.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org