1 # User Sessions {#sec-user-sessions}
3 Systemd keeps track of all users who are logged into the system (e.g. on
4 a virtual console or remotely via SSH). The command `loginctl` allows
5 querying and manipulating user sessions. For instance, to list all user
16 This shows that two users are logged in locally, while another is logged
17 in remotely. ("Seats" are essentially the combinations of displays and
18 input devices attached to the system; usually, there is only one seat.)
19 To get information about a session:
22 $ loginctl session-status c3
24 Since: Tue, 2013-01-08 01:17:56 CET; 4min 42s ago
28 Service: login; type tty; class user
30 CGroup: name=systemd:/user/root/c3
31 ├─ 2536 /nix/store/10mn4xip9n7y9bxqwnsx7xwx2v2g34xn-shadow-4.1.5.1/bin/login --
36 This shows that the user is logged in on virtual console 3. It also
37 lists the processes belonging to this session. Since systemd keeps track
38 of this, you can terminate a session in a way that ensures that all the
39 session's processes are gone:
42 # loginctl terminate-session c3