User Tools

Site Tools


linux:debian:linger

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:debian:linger [2022/02/12 07:54] – created oscarlinux:debian:linger [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Linger ====== 
-By default, users cannot set user services to run at boot time. The admin must enable this on an individual basis for each user. If lingering is enabled for a specific user, a user manager is spawned for the user at boot and kept around after logouts. This allows users who are not logged in to run long-running services. Takes one or more user names or numeric UIDs as argument. If no argument is specified, enables/disables lingering for the user of the session of the caller. 
-===== Enable Lingering for user ===== 
-  loginctl enable-linger $USER 
-  loginctl disable-linger $USER 
-Or alternatively: 
-  touch /var/lib/systemd/linger/$USER 
-  rm /var/lib/systemd/linger/$USER 
- 
-===== Show status for user ===== 
-You can show a list of lingering users with: 
-  ls /var/lib/systemd/linger 
-Or alternatively: 
-   loginctl user-status $USER 
- 
-===== Check status in scripts ===== 
-To check user lingering status in scripts (programmatically): 
-  loginctl show-user "$USER" --property=Linger | grep -q 'yes' 
- 
- 
- 
  
linux/debian/linger.1644652498.txt.gz · Last modified: by oscar