1LOGINCTL(1)                        loginctl                        LOGINCTL(1)
2
3
4

NAME

6       loginctl - Control the systemd login manager
7

SYNOPSIS

9       loginctl [OPTIONS...] {COMMAND} [NAME...]
10

DESCRIPTION

12       loginctl may be used to introspect and control the state of the
13       systemd(1) login manager systemd-logind.service(8).
14

OPTIONS

16       The following options are understood:
17
18       --no-ask-password
19           Do not query the user for authentication for privileged operations.
20
21       -p, --property=
22           When showing session/user/seat properties, limit display to certain
23           properties as specified as argument. If not specified, all set
24           properties are shown. The argument should be a property name, such
25           as "Sessions". If specified more than once, all properties with the
26           specified names are shown.
27
28       -a, --all
29           When showing session/user/seat properties, show all properties
30           regardless of whether they are set or not.
31
32       -l, --full
33           Do not ellipsize process tree entries.
34
35       --kill-who=
36           When used with kill-session, choose which processes to kill. Must
37           be one of leader, or all to select whether to kill only the leader
38           process of the session or all processes of the session. If omitted,
39           defaults to all.
40
41       -s, --signal=
42           When used with kill-session or kill-user, choose which signal to
43           send to selected processes. Must be one of the well known signal
44           specifiers, such as SIGTERM, SIGINT or SIGSTOP. If omitted,
45           defaults to SIGTERM.
46
47       -n, --lines=
48           When used with user-status and session-status, controls the number
49           of journal lines to show, counting from the most recent ones. Takes
50           a positive integer argument. Defaults to 10.
51
52       -o, --output=
53           When used with user-status and session-status, controls the
54           formatting of the journal entries that are shown. For the available
55           choices, see journalctl(1). Defaults to "short".
56
57       -H, --host=
58           Execute the operation remotely. Specify a hostname, or a username
59           and hostname separated by "@", to connect to. The hostname may
60           optionally be suffixed by a container name, separated by ":", which
61           connects directly to a specific container on the specified host.
62           This will use SSH to talk to the remote machine manager instance.
63           Container names may be enumerated with machinectl -H HOST.
64
65       -M, --machine=
66           Execute operation on a local container. Specify a container name to
67           connect to.
68
69       --no-pager
70           Do not pipe output into a pager.
71
72       --no-legend
73           Do not print the legend, i.e. column headers and the footer with
74           hints.
75
76       -h, --help
77           Print a short help text and exit.
78
79       --version
80           Print a short version string and exit.
81

COMMANDS

83       The following commands are understood:
84
85   Session Commands
86       list-sessions
87           List current sessions.
88
89       session-status [ID...]
90           Show terse runtime status information about one or more sessions,
91           followed by the most recent log data from the journal. Takes one or
92           more session identifiers as parameters. If no session identifiers
93           are passed the status of the caller's session is shown. This
94           function is intended to generate human-readable output. If you are
95           looking for computer-parsable output, use show-session instead.
96
97       show-session [ID...]
98           Show properties of one or more sessions or the manager itself. If
99           no argument is specified, properties of the manager will be shown.
100           If a session ID is specified, properties of the session are shown.
101           By default, empty properties are suppressed. Use --all to show
102           those too. To select specific properties to show, use --property=.
103           This command is intended to be used whenever computer-parsable
104           output is required. Use session-status if you are looking for
105           formatted human-readable output.
106
107       activate [ID]
108           Activate a session. This brings a session into the foreground, if
109           another session is currently in the foreground on the respective
110           seat. Takes a session identifier as argument. If no argument is
111           specified the session of the caller is put into foreground.
112
113       lock-session [ID...], unlock-session [ID...]
114           Activates/deactivates the screen lock on one or more sessions, if
115           the session supports it. Takes one or more session identifiers as
116           arguments. If no argument is specified the session of the caller is
117           locked/unlocked.
118
119       lock-sessions, unlock-sessions
120           Activates/deactivates the screen lock on all current sessions
121           supporting it.
122
123       terminate-session ID...
124           Terminates a session. This kills all processes of the session and
125           deallocates all resources attached to the session.
126
127       kill-session ID...
128           Send a signal to one or more processes of the session. Use
129           --kill-who= to select which process to kill. Use --signal= to
130           select the signal to send.
131
132   User Commands
133       list-users
134           List currently logged in users.
135
136       user-status [USER...]
137           Show terse runtime status information about one or more logged in
138           users, followed by the most recent log data from the journal. Takes
139           one or more user names or numeric user IDs as parameters. If no
140           parameters are passed the status of the caller's user is shown.
141           This function is intended to generate human-readable output. If you
142           are looking for computer-parsable output, use show-user instead.
143           Users may be specified by their usernames or numeric user IDs.
144
145       show-user [USER...]
146           Show properties of one or more users or the manager itself. If no
147           argument is specified, properties of the manager will be shown. If
148           a user is specified, properties of the user are shown. By default,
149           empty properties are suppressed. Use --all to show those too. To
150           select specific properties to show, use --property=. This command
151           is intended to be used whenever computer-parsable output is
152           required. Use user-status if you are looking for formatted
153           human-readable output.
154
155       enable-linger [USER...], disable-linger [USER...]
156           Enable/disable user lingering for one or more users. If enabled for
157           a specific user, a user manager is spawned for the user at boot and
158           kept around after logouts. This allows users who are not logged in
159           to run long-running services. Takes one or more user names or
160           numeric UIDs as argument. If no argument is specified
161           enables/disables lingering for the user of the session of the
162           caller.
163
164       terminate-user USER...
165           Terminates all sessions of a user. This kills all processes of all
166           sessions of the user and deallocates all runtime resources attached
167           to the user.
168
169       kill-user USER...
170           Send a signal to all processes of a user. Use --signal= to select
171           the signal to send.
172
173   Seat Commands
174       list-seats
175           List currently available seats on the local system.
176
177       seat-status [NAME...]
178           Show terse runtime status information about one or more seats.
179           Takes one or more seat names as parameters. If no seat names are
180           passed the status of the caller's session's seat is shown. This
181           function is intended to generate human-readable output. If you are
182           looking for computer-parsable output, use show-seat instead.
183
184       show-seat [NAME...]
185           Show properties of one or more seats or the manager itself. If no
186           argument is specified, properties of the manager will be shown. If
187           a seat is specified, properties of the seat are shown. By default,
188           empty properties are suppressed. Use --all to show those too. To
189           select specific properties to show, use --property=. This command
190           is intended to be used whenever computer-parsable output is
191           required. Use seat-status if you are looking for formatted
192           human-readable output.
193
194       attach NAME DEVICE...
195           Persistently attach one or more devices to a seat. The devices
196           should be specified via device paths in the /sys file system. To
197           create a new seat, attach at least one graphics card to a
198           previously unused seat name. Seat names may consist only of a-z,
199           A-Z, 0-9, "-" and "_" and must be prefixed with "seat". To drop
200           assignment of a device to a specific seat, just reassign it to a
201           different seat, or use flush-devices.
202
203       flush-devices
204           Removes all device assignments previously created with attach.
205           After this call, only automatically generated seats will remain,
206           and all seat hardware is assigned to them.
207
208       terminate-seat NAME...
209           Terminates all sessions on a seat. This kills all processes of all
210           sessions on the seat and deallocates all runtime resources attached
211           to them.
212

EXIT STATUS

214       On success, 0 is returned, a non-zero failure code otherwise.
215

ENVIRONMENT

217       $SYSTEMD_PAGER
218           Pager to use when --no-pager is not given; overrides $PAGER.
219           Setting this to an empty string or the value "cat" is equivalent to
220           passing --no-pager.
221
222       $SYSTEMD_LESS
223           Override the default options passed to less ("FRSXMK").
224

SEE ALSO

226       systemd(1), systemctl(1), systemd-logind.service(8), logind.conf(5)
227
228
229
230systemd 219                                                        LOGINCTL(1)
Impressum