]>
Commit | Line | Data |
---|---|---|
a61933ad LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2010 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
11 | under the terms of the GNU Lesser General Public License as published by |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
a61933ad LP |
13 | (at your option) any later version. |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 18 | Lesser General Public License for more details. |
a61933ad | 19 | |
5430f7f2 | 20 | You should have received a copy of the GNU Lesser General Public License |
a61933ad LP |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
22 | --> | |
23 | ||
169c4f65 | 24 | <refentry id="loginctl"> |
a61933ad LP |
25 | |
26 | <refentryinfo> | |
169c4f65 | 27 | <title>loginctl</title> |
a61933ad LP |
28 | <productname>systemd</productname> |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
169c4f65 | 41 | <refentrytitle>loginctl</refentrytitle> |
a61933ad LP |
42 | <manvolnum>1</manvolnum> |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
169c4f65 | 46 | <refname>loginctl</refname> |
a61933ad LP |
47 | <refpurpose>Control the systemd login manager</refpurpose> |
48 | </refnamediv> | |
49 | ||
50 | <refsynopsisdiv> | |
51 | <cmdsynopsis> | |
169c4f65 | 52 | <command>loginctl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg> <arg choice="opt" rep="repeat">NAME</arg></command> |
a61933ad LP |
53 | </cmdsynopsis> |
54 | </refsynopsisdiv> | |
55 | ||
56 | <refsect1> | |
57 | <title>Description</title> | |
58 | ||
169c4f65 | 59 | <para><command>loginctl</command> may be used to |
a61933ad LP |
60 | introspect and control the state of the |
61 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
af3bccd6 | 62 | login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
a61933ad LP |
63 | </refsect1> |
64 | ||
65 | <refsect1> | |
66 | <title>Options</title> | |
67 | ||
68 | <para>The following options are understood:</para> | |
69 | ||
70 | <variablelist> | |
71 | <varlistentry> | |
72 | <term><option>--help</option></term> | |
73 | <term><option>-h</option></term> | |
74 | ||
75 | <listitem><para>Prints a short help | |
76 | text and exits.</para></listitem> | |
77 | </varlistentry> | |
78 | ||
79 | <varlistentry> | |
80 | <term><option>--version</option></term> | |
81 | ||
82 | <listitem><para>Prints a short version | |
83 | string and exits.</para></listitem> | |
84 | </varlistentry> | |
85 | ||
86 | <varlistentry> | |
87 | <term><option>--property=</option></term> | |
88 | <term><option>-p</option></term> | |
89 | ||
90 | <listitem><para>When showing | |
91 | session/user/ properties, limit | |
92 | display to certain properties as | |
93 | specified as argument. If not | |
94 | specified all set properties are | |
95 | shown. The argument should be a | |
96 | property name, such as | |
97 | <literal>Sessions</literal>. If | |
98 | specified more than once all | |
99 | properties with the specified names | |
100 | are shown.</para></listitem> | |
101 | </varlistentry> | |
102 | ||
103 | <varlistentry> | |
104 | <term><option>--all</option></term> | |
105 | <term><option>-a</option></term> | |
106 | ||
107 | <listitem><para>When showing | |
108 | unit/job/manager properties, show all | |
109 | properties regardless whether they are | |
110 | set or not.</para></listitem> | |
111 | </varlistentry> | |
112 | ||
113 | ||
114 | <varlistentry> | |
115 | <term><option>--no-pager</option></term> | |
116 | ||
0e25e94e KS |
117 | <listitem><para>Do not pipe output into a |
118 | pager.</para></listitem> | |
119 | </varlistentry> | |
a61933ad | 120 | |
6bb92a16 LP |
121 | <varlistentry> |
122 | <term><option>--no-ask-password</option></term> | |
123 | ||
124 | <listitem><para>Don't query the user | |
125 | for authentication for privileged | |
126 | operations.</para></listitem> | |
127 | </varlistentry> | |
128 | ||
a61933ad LP |
129 | <varlistentry> |
130 | <term><option>--kill-who=</option></term> | |
131 | ||
132 | <listitem><para>When used with | |
133 | <command>kill-session</command>, | |
134 | choose which processes to kill. Must | |
135 | be one of <option>leader</option>, or | |
136 | <option>all</option> to select whether | |
137 | to kill only the leader process of the | |
138 | session or all processes of the | |
139 | session. If omitted defaults to | |
140 | <option>all</option>.</para></listitem> | |
141 | </varlistentry> | |
142 | ||
143 | <varlistentry> | |
144 | <term><option>--signal=</option></term> | |
145 | <term><option>-s</option></term> | |
146 | ||
147 | <listitem><para>When used with | |
148 | <command>kill-session</command> or | |
149 | <command>kill-user</command>, choose | |
150 | which signal to send to selected | |
151 | processes. Must be one of the well | |
152 | known signal specifiers such as | |
153 | SIGTERM, SIGINT or SIGSTOP. If omitted | |
154 | defaults to | |
155 | <option>SIGTERM</option>.</para></listitem> | |
156 | </varlistentry> | |
157 | ||
158 | <varlistentry> | |
159 | <term><option>-H</option></term> | |
160 | <term><option>--host</option></term> | |
161 | ||
162 | <listitem><para>Execute operation | |
163 | remotely. Specify a hostname, or | |
164 | username and hostname separated by @, | |
165 | to connect to. This will use SSH to | |
166 | talk to the remote login manager | |
167 | instance.</para></listitem> | |
168 | </varlistentry> | |
169 | ||
170 | <varlistentry> | |
171 | <term><option>-P</option></term> | |
172 | <term><option>--privileged</option></term> | |
173 | ||
174 | <listitem><para>Acquire privileges via | |
175 | PolicyKit before executing the | |
176 | operation.</para></listitem> | |
177 | </varlistentry> | |
178 | </variablelist> | |
179 | ||
180 | <para>The following commands are understood:</para> | |
181 | ||
182 | <variablelist> | |
183 | <varlistentry> | |
184 | <term><command>list-sessions</command></term> | |
185 | ||
186 | <listitem><para>List current sessions.</para></listitem> | |
187 | </varlistentry> | |
188 | ||
189 | <varlistentry> | |
190 | <term><command>session-status [ID...]</command></term> | |
191 | ||
192 | <listitem><para>Show terse runtime | |
193 | status information about one or more | |
194 | sessions. This function is intended to | |
195 | generate human-readable output. If you | |
196 | are looking for computer-parsable | |
197 | output, use | |
198 | <command>show-session</command> | |
199 | instead.</para></listitem> | |
200 | </varlistentry> | |
201 | ||
202 | <varlistentry> | |
203 | <term><command>show-session [ID...]</command></term> | |
204 | ||
205 | <listitem><para>Show properties of one | |
206 | or more sessions or the manager | |
207 | itself. If no argument is specified | |
208 | properties of the manager will be | |
209 | shown. If a session ID is specified | |
210 | properties of the session is shown. By | |
211 | default, empty properties are | |
212 | suppressed. Use <option>--all</option> | |
213 | to show those too. To select specific | |
214 | properties to show use | |
215 | <option>--property=</option>. This | |
216 | command is intended to be used | |
217 | whenever computer-parsable output is | |
218 | required. Use | |
219 | <command>session-status</command> if | |
220 | you are looking for formatted | |
221 | human-readable | |
222 | output.</para></listitem> | |
223 | </varlistentry> | |
224 | ||
225 | <varlistentry> | |
226 | <term><command>activate [ID...]</command></term> | |
227 | ||
228 | <listitem><para>Activate one or more | |
229 | sessions. This brings one or more | |
230 | sessions into the foreground, if | |
231 | another session is currently in the | |
232 | foreground on the respective | |
233 | seat.</para></listitem> | |
234 | </varlistentry> | |
235 | ||
236 | <varlistentry> | |
283ef082 MV |
237 | <term><command>lock-session [ID...]</command></term> |
238 | <term><command>unlock-session [ID...]</command></term> | |
a61933ad LP |
239 | |
240 | <listitem><para>Activates/deactivates | |
241 | the screen lock on one or more | |
242 | sessions, if the session supports it.</para></listitem> | |
243 | </varlistentry> | |
244 | ||
245 | <varlistentry> | |
246 | <term><command>terminate-session [ID...]</command></term> | |
247 | ||
248 | <listitem><para>Terminates a | |
249 | session. This kills all processes of | |
250 | the session and deallocates all | |
251 | resources attached to the | |
252 | session.</para></listitem> | |
253 | </varlistentry> | |
254 | ||
255 | <varlistentry> | |
256 | <term><command>kill-session [ID...]</command></term> | |
257 | ||
258 | <listitem><para>Send a signal to one | |
259 | or more processes of the session. Use | |
260 | <option>--kill-who=</option> to select | |
261 | which process to kill. Use | |
262 | <option>--signal=</option> to select | |
263 | the signal to send.</para></listitem> | |
264 | </varlistentry> | |
265 | ||
266 | <varlistentry> | |
267 | <term><command>list-users</command></term> | |
268 | ||
269 | <listitem><para>List currently logged | |
270 | in users.</para></listitem> | |
271 | </varlistentry> | |
272 | ||
273 | <varlistentry> | |
274 | <term><command>user-status [USER...]</command></term> | |
275 | ||
276 | <listitem><para>Show terse runtime | |
277 | status information about one or more | |
278 | logged in users. This function is | |
279 | intended to generate human-readable | |
280 | output. If you are looking for | |
281 | computer-parsable output, use | |
282 | <command>show-user</command> | |
283 | instead. Users may be specified by | |
284 | their usernames or numeric user | |
285 | IDs.</para></listitem> | |
286 | </varlistentry> | |
287 | ||
288 | <varlistentry> | |
289 | <term><command>show-user [USER...]</command></term> | |
290 | ||
291 | <listitem><para>Show properties of one | |
292 | or more users or the manager | |
293 | itself. If no argument is specified | |
294 | properties of the manager will be | |
295 | shown. If a user is specified | |
296 | properties of the user is shown. By | |
297 | default, empty properties are | |
298 | suppressed. Use <option>--all</option> | |
299 | to show those too. To select specific | |
300 | properties to show use | |
301 | <option>--property=</option>. This | |
302 | command is intended to be used | |
303 | whenever computer-parsable output is | |
304 | required. Use | |
305 | <command>user-status</command> if | |
306 | you are looking for formatted | |
307 | human-readable | |
308 | output.</para></listitem> | |
309 | </varlistentry> | |
310 | ||
311 | <varlistentry> | |
312 | <term><command>enable-linger [USER...]</command></term> | |
313 | <term><command>disable-linger [USER...]</command></term> | |
314 | ||
315 | <listitem><para>Enable/disable user | |
316 | lingering for one or more users. If | |
317 | enabled for a specific user a user | |
318 | manager is spawned for him/her at | |
319 | boot, and kept around after | |
320 | logouts. This allows users who aren't | |
321 | logged in to run long-running | |
322 | services.</para></listitem> | |
323 | </varlistentry> | |
324 | ||
325 | <varlistentry> | |
326 | <term><command>terminate-user [USER...]</command></term> | |
327 | ||
328 | <listitem><para>Terminates all | |
329 | sessions of a user. This kills all | |
330 | processes of all sessions of the user | |
331 | and deallocates all runtime resources | |
332 | attached to the | |
333 | user.</para></listitem> | |
334 | </varlistentry> | |
335 | ||
336 | <varlistentry> | |
337 | <term><command>kill-user [USER...]</command></term> | |
338 | ||
339 | <listitem><para>Send a signal to all | |
340 | processes of a user. Use | |
341 | <option>--signal=</option> to select | |
342 | the signal to send.</para></listitem> | |
343 | </varlistentry> | |
344 | ||
345 | <varlistentry> | |
346 | <term><command>list-seats</command></term> | |
347 | ||
348 | <listitem><para>List currently | |
349 | available seats on the local | |
350 | system.</para></listitem> | |
351 | </varlistentry> | |
352 | ||
353 | <varlistentry> | |
354 | <term><command>seat-status [NAME...]</command></term> | |
355 | ||
356 | <listitem><para>Show terse runtime | |
357 | status information about one or more | |
358 | seats. This function is | |
359 | intended to generate human-readable | |
360 | output. If you are looking for | |
361 | computer-parsable output, use | |
362 | <command>show-seat</command> | |
363 | instead.</para></listitem> | |
364 | </varlistentry> | |
365 | ||
366 | <varlistentry> | |
367 | <term><command>show-seat [NAME...]</command></term> | |
368 | ||
369 | <listitem><para>Show properties of one | |
370 | or more seats or the manager | |
371 | itself. If no argument is specified | |
372 | properties of the manager will be | |
373 | shown. If a seat is specified | |
374 | properties of the seat are shown. By | |
375 | default, empty properties are | |
376 | suppressed. Use <option>--all</option> | |
377 | to show those too. To select specific | |
378 | properties to show use | |
379 | <option>--property=</option>. This | |
380 | command is intended to be used | |
381 | whenever computer-parsable output is | |
382 | required. Use | |
383 | <command>seat-status</command> if you | |
384 | are looking for formatted | |
385 | human-readable | |
386 | output.</para></listitem> | |
387 | </varlistentry> | |
388 | ||
389 | <varlistentry> | |
390 | <term><command>attach [NAME] [DEVICE...]</command></term> | |
391 | ||
392 | <listitem><para>Attach one or more | |
393 | devices to a seat. The devices should | |
394 | be specified via device paths in the | |
395 | <filename>/sys</filename> file | |
396 | system. To create a new seat attach at | |
397 | least one graphics card to a | |
398 | previously unused seat names. seat | |
399 | names may consist only of a-z, A-Z, | |
400 | 0-9, "-" and "_" and must be prefixed | |
401 | with "seat". To drop assignment of a | |
402 | device to a specific seat just | |
403 | reassign it to a different seat, or | |
404 | use | |
405 | <command>flush-devices</command>.</para></listitem> | |
406 | </varlistentry> | |
407 | ||
408 | <varlistentry> | |
409 | <term><command>flush-devices</command></term> | |
410 | ||
411 | <listitem><para>Removes all device | |
412 | assignments previously created with | |
413 | <command>attach</command>. After this | |
414 | call only automatically generated | |
415 | seats will remain and all seat | |
416 | hardware is assigned to | |
417 | them.</para></listitem> | |
418 | </varlistentry> | |
419 | ||
420 | <varlistentry> | |
421 | <term><command>terminate-seat [NAME...]</command></term> | |
422 | ||
423 | <listitem><para>Terminates all | |
424 | sessions on a seat. This kills all | |
425 | processes of all sessions on a seat and | |
426 | deallocates all runtime resources | |
427 | attached to them.</para></listitem> | |
428 | </varlistentry> | |
429 | </variablelist> | |
430 | ||
431 | </refsect1> | |
432 | ||
433 | <refsect1> | |
434 | <title>Exit status</title> | |
435 | ||
436 | <para>On success 0 is returned, a non-zero failure | |
437 | code otherwise.</para> | |
438 | </refsect1> | |
439 | ||
440 | <refsect1> | |
441 | <title>Environment</title> | |
442 | ||
443 | <variablelist> | |
444 | <varlistentry> | |
445 | <term><varname>$SYSTEMD_PAGER</varname></term> | |
446 | <listitem><para>Pager to use when | |
447 | <option>--no-pager</option> is not given; | |
448 | overrides <varname>$PAGER</varname>. Setting | |
449 | this to an empty string or the value | |
450 | <literal>cat</literal> is equivalent to passing | |
451 | <option>--no-pager</option>.</para></listitem> | |
452 | </varlistentry> | |
453 | </variablelist> | |
454 | </refsect1> | |
455 | ||
456 | <refsect1> | |
457 | <title>See Also</title> | |
458 | <para> | |
459 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
4e2d4c08 | 460 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
af3bccd6 | 461 | <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
18b754d3 | 462 | <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
a61933ad LP |
463 | </para> |
464 | </refsect1> | |
465 | ||
466 | </refentry> |