summary refs log tree commit diff
path: root/nixos/doc/manual/from_md/administration/user-sessions.chapter.xml
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /nixos/doc/manual/from_md/administration/user-sessions.chapter.xml
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar.gz
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar.bz2
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar.lz
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar.xz
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.tar.zst
nixpkgs-9ff36293d1e428cd7bf03e8d4b03611b6d361c28.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'nixos/doc/manual/from_md/administration/user-sessions.chapter.xml')
-rw-r--r--nixos/doc/manual/from_md/administration/user-sessions.chapter.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixos/doc/manual/from_md/administration/user-sessions.chapter.xml b/nixos/doc/manual/from_md/administration/user-sessions.chapter.xml
new file mode 100644
index 00000000000..e8c64f153fc
--- /dev/null
+++ b/nixos/doc/manual/from_md/administration/user-sessions.chapter.xml
@@ -0,0 +1,46 @@
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-user-sessions">
+  <title>User Sessions</title>
+  <para>
+    Systemd keeps track of all users who are logged into the system
+    (e.g. on a virtual console or remotely via SSH). The command
+    <literal>loginctl</literal> allows querying and manipulating user
+    sessions. For instance, to list all user sessions:
+  </para>
+  <programlisting>
+$ loginctl
+   SESSION        UID USER             SEAT
+        c1        500 eelco            seat0
+        c3          0 root             seat0
+        c4        500 alice
+</programlisting>
+  <para>
+    This shows that two users are logged in locally, while another is
+    logged in remotely. (<quote>Seats</quote> are essentially the
+    combinations of displays and input devices attached to the system;
+    usually, there is only one seat.) To get information about a
+    session:
+  </para>
+  <programlisting>
+$ loginctl session-status c3
+c3 - root (0)
+           Since: Tue, 2013-01-08 01:17:56 CET; 4min 42s ago
+          Leader: 2536 (login)
+            Seat: seat0; vc3
+             TTY: /dev/tty3
+         Service: login; type tty; class user
+           State: online
+          CGroup: name=systemd:/user/root/c3
+                  ├─ 2536 /nix/store/10mn4xip9n7y9bxqwnsx7xwx2v2g34xn-shadow-4.1.5.1/bin/login --
+                  ├─10339 -bash
+                  └─10355 w3m nixos.org
+</programlisting>
+  <para>
+    This shows that the user is logged in on virtual console 3. It also
+    lists the processes belonging to this session. Since systemd keeps
+    track of this, you can terminate a session in a way that ensures
+    that all the session’s processes are gone:
+  </para>
+  <programlisting>
+# loginctl terminate-session c3
+</programlisting>
+</chapter>