loginctl(1)でlingerを設定する
loginctl(1)でlingerを設定する
code:plain
loginctl enable-linger
code:plain
loginctl user-status iigau
iigau (1002)
Since: Wed 2024-09-25 07:24:49 JST; 46min ago
State: active
Sessions: *5592
Linger: yes
Unit: user-1002.slice
├─session-5592.scope
loginctl(1)でlingerを設定する
この記事では、Arch Wikiの記事を参照しているので、自分も確かめる。
Automatic start-up of systemd user instances
The systemd user instance is started after the first login of a user and killed after the last session of the user is closed. Sometimes it may be useful to start it right after boot, and keep the systemd user instance running after the last session closes, for instance to have some user process running without any open session. Lingering is used to that effect. Use the following command to enable lingering for your own user, if polkit is installed:
systemdのユーザーインスタンスは、ユーザーが最初にログインした後に開始され、ユーザーの最後のセッションが閉じられたときにキルされます。時折、起動のすぐあとにインスタンスを開始して、systemdのユーザーインスタンスを、最後のセッションが閉じたあとも動かし続けられると便利なときがあるかもしれません(たとえばどの有効なセッションがなくてもユーザープロセスを動かし続けさせるためなど)。Lingeringはその趣旨で用いられます。