]> git.proxmox.com Git - systemd.git/blob - man/loginctl.1
Imported Upstream version 219
[systemd.git] / man / loginctl.1
1 '\" t
2 .TH "LOGINCTL" "1" "" "systemd 219" "loginctl"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 loginctl \- Control the systemd login manager
24 .SH "SYNOPSIS"
25 .HP \w'\fBloginctl\fR\ 'u
26 \fBloginctl\fR [OPTIONS...] {COMMAND} [NAME...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBloginctl\fR
30 may be used to introspect and control the state of the
31 \fBsystemd\fR(1)
32 login manager
33 \fBsystemd-logind.service\fR(8)\&.
34 .SH "OPTIONS"
35 .PP
36 The following options are understood:
37 .PP
38 \fB\-\-no\-ask\-password\fR
39 .RS 4
40 Do not query the user for authentication for privileged operations\&.
41 .RE
42 .PP
43 \fB\-p\fR, \fB\-\-property=\fR
44 .RS 4
45 When showing session/user/seat properties, limit display to certain properties as specified as argument\&. If not specified, all set properties are shown\&. The argument should be a property name, such as
46 "Sessions"\&. If specified more than once, all properties with the specified names are shown\&.
47 .RE
48 .PP
49 \fB\-a\fR, \fB\-\-all\fR
50 .RS 4
51 When showing session/user/seat properties, show all properties regardless of whether they are set or not\&.
52 .RE
53 .PP
54 \fB\-l\fR, \fB\-\-full\fR
55 .RS 4
56 Do not ellipsize process tree entries\&.
57 .RE
58 .PP
59 \fB\-\-kill\-who=\fR
60 .RS 4
61 When used with
62 \fBkill\-session\fR, choose which processes to kill\&. Must be one of
63 \fBleader\fR, or
64 \fBall\fR
65 to select whether to kill only the leader process of the session or all processes of the session\&. If omitted, defaults to
66 \fBall\fR\&.
67 .RE
68 .PP
69 \fB\-s\fR, \fB\-\-signal=\fR
70 .RS 4
71 When used with
72 \fBkill\-session\fR
73 or
74 \fBkill\-user\fR, choose which signal to send to selected processes\&. Must be one of the well known signal specifiers, such as
75 \fBSIGTERM\fR,
76 \fBSIGINT\fR
77 or
78 \fBSIGSTOP\fR\&. If omitted, defaults to
79 \fBSIGTERM\fR\&.
80 .RE
81 .PP
82 \fB\-n\fR, \fB\-\-lines=\fR
83 .RS 4
84 When used with
85 \fBuser\-status\fR
86 and
87 \fBsession\-status\fR, controls the number of journal lines to show, counting from the most recent ones\&. Takes a positive integer argument\&. Defaults to 10\&.
88 .RE
89 .PP
90 \fB\-o\fR, \fB\-\-output=\fR
91 .RS 4
92 When used with
93 \fBuser\-status\fR
94 and
95 \fBsession\-status\fR, controls the formatting of the journal entries that are shown\&. For the available choices, see
96 \fBjournalctl\fR(1)\&. Defaults to
97 "short"\&.
98 .RE
99 .PP
100 \fB\-H\fR, \fB\-\-host=\fR
101 .RS 4
102 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
103 "@", to connect to\&. The hostname may optionally be suffixed by a container name, separated by
104 ":", which connects directly to a specific container on the specified host\&. This will use SSH to talk to the remote machine manager instance\&. Container names may be enumerated with
105 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&.
106 .RE
107 .PP
108 \fB\-M\fR, \fB\-\-machine=\fR
109 .RS 4
110 Execute operation on a local container\&. Specify a container name to connect to\&.
111 .RE
112 .PP
113 \fB\-\-no\-pager\fR
114 .RS 4
115 Do not pipe output into a pager\&.
116 .RE
117 .PP
118 \fB\-\-no\-legend\fR
119 .RS 4
120 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
121 .RE
122 .PP
123 \fB\-h\fR, \fB\-\-help\fR
124 .RS 4
125 Print a short help text and exit\&.
126 .RE
127 .PP
128 \fB\-\-version\fR
129 .RS 4
130 Print a short version string and exit\&.
131 .RE
132 .SH "COMMANDS"
133 .PP
134 The following commands are understood:
135 .SS "Session Commands"
136 .PP
137 \fBlist\-sessions\fR
138 .RS 4
139 List current sessions\&.
140 .RE
141 .PP
142 \fBsession\-status\fR [\fIID\fR\&.\&.\&.]
143 .RS 4
144 Show terse runtime status information about one or more sessions, followed by the most recent log data from the journal\&. Takes one or more session identifiers as parameters\&. If no session identifiers are passed the status of the caller\*(Aqs session is shown\&. This function is intended to generate human\-readable output\&. If you are looking for computer\-parsable output, use
145 \fBshow\-session\fR
146 instead\&.
147 .RE
148 .PP
149 \fBshow\-session\fR [\fIID\fR\&.\&.\&.]
150 .RS 4
151 Show properties of one or more sessions or the manager itself\&. If no argument is specified, properties of the manager will be shown\&. If a session ID is specified, properties of the session are shown\&. By default, empty properties are suppressed\&. Use
152 \fB\-\-all\fR
153 to show those too\&. To select specific properties to show, use
154 \fB\-\-property=\fR\&. This command is intended to be used whenever computer\-parsable output is required\&. Use
155 \fBsession\-status\fR
156 if you are looking for formatted human\-readable output\&.
157 .RE
158 .PP
159 \fBactivate\fR [\fIID\fR]
160 .RS 4
161 Activate a session\&. This brings a session into the foreground, if another session is currently in the foreground on the respective seat\&. Takes a session identifier as argument\&. If no argument is specified the session of the caller is put into foreground\&.
162 .RE
163 .PP
164 \fBlock\-session\fR [\fIID\fR\&.\&.\&.], \fBunlock\-session\fR [\fIID\fR\&.\&.\&.]
165 .RS 4
166 Activates/deactivates the screen lock on one or more sessions, if the session supports it\&. Takes one or more session identifiers as arguments\&. If no argument is specified the session of the caller is locked/unlocked\&.
167 .RE
168 .PP
169 \fBlock\-sessions\fR, \fBunlock\-sessions\fR
170 .RS 4
171 Activates/deactivates the screen lock on all current sessions supporting it\&.
172 .RE
173 .PP
174 \fBterminate\-session\fR \fIID\fR\&.\&.\&.
175 .RS 4
176 Terminates a session\&. This kills all processes of the session and deallocates all resources attached to the session\&.
177 .RE
178 .PP
179 \fBkill\-session\fR \fIID\fR\&.\&.\&.
180 .RS 4
181 Send a signal to one or more processes of the session\&. Use
182 \fB\-\-kill\-who=\fR
183 to select which process to kill\&. Use
184 \fB\-\-signal=\fR
185 to select the signal to send\&.
186 .RE
187 .SS "User Commands"
188 .PP
189 \fBlist\-users\fR
190 .RS 4
191 List currently logged in users\&.
192 .RE
193 .PP
194 \fBuser\-status\fR [\fIUSER\fR\&.\&.\&.]
195 .RS 4
196 Show terse runtime status information about one or more logged in users, followed by the most recent log data from the journal\&. Takes one or more user names or numeric user IDs as parameters\&. If no parameters are passed the status of the caller\*(Aqs user is shown\&. This function is intended to generate human\-readable output\&. If you are looking for computer\-parsable output, use
197 \fBshow\-user\fR
198 instead\&. Users may be specified by their usernames or numeric user IDs\&.
199 .RE
200 .PP
201 \fBshow\-user\fR [\fIUSER\fR\&.\&.\&.]
202 .RS 4
203 Show properties of one or more users or the manager itself\&. If no argument is specified, properties of the manager will be shown\&. If a user is specified, properties of the user are shown\&. By default, empty properties are suppressed\&. Use
204 \fB\-\-all\fR
205 to show those too\&. To select specific properties to show, use
206 \fB\-\-property=\fR\&. This command is intended to be used whenever computer\-parsable output is required\&. Use
207 \fBuser\-status\fR
208 if you are looking for formatted human\-readable output\&.
209 .RE
210 .PP
211 \fBenable\-linger\fR [\fIUSER\fR\&.\&.\&.], \fBdisable\-linger\fR [\fIUSER\fR\&.\&.\&.]
212 .RS 4
213 Enable/disable user lingering for one or more users\&. If enabled for a specific user, a user manager is spawned for the user at boot and kept around after logouts\&. This allows users who are not logged in to run long\-running services\&. Takes one or more user names or numeric UIDs as argument\&. If no argument is specified enables/disables lingering for the user of the session of the caller\&.
214 .RE
215 .PP
216 \fBterminate\-user\fR \fIUSER\fR\&.\&.\&.
217 .RS 4
218 Terminates all sessions of a user\&. This kills all processes of all sessions of the user and deallocates all runtime resources attached to the user\&.
219 .RE
220 .PP
221 \fBkill\-user\fR \fIUSER\fR\&.\&.\&.
222 .RS 4
223 Send a signal to all processes of a user\&. Use
224 \fB\-\-signal=\fR
225 to select the signal to send\&.
226 .RE
227 .SS "Seat Commands"
228 .PP
229 \fBlist\-seats\fR
230 .RS 4
231 List currently available seats on the local system\&.
232 .RE
233 .PP
234 \fBseat\-status\fR [\fINAME\fR\&.\&.\&.]
235 .RS 4
236 Show terse runtime status information about one or more seats\&. Takes one or more seat names as parameters\&. If no seat names are passed the status of the caller\*(Aqs session\*(Aqs seat is shown\&. This function is intended to generate human\-readable output\&. If you are looking for computer\-parsable output, use
237 \fBshow\-seat\fR
238 instead\&.
239 .RE
240 .PP
241 \fBshow\-seat\fR [\fINAME\fR\&.\&.\&.]
242 .RS 4
243 Show properties of one or more seats or the manager itself\&. If no argument is specified, properties of the manager will be shown\&. If a seat is specified, properties of the seat are shown\&. By default, empty properties are suppressed\&. Use
244 \fB\-\-all\fR
245 to show those too\&. To select specific properties to show, use
246 \fB\-\-property=\fR\&. This command is intended to be used whenever computer\-parsable output is required\&. Use
247 \fBseat\-status\fR
248 if you are looking for formatted human\-readable output\&.
249 .RE
250 .PP
251 \fBattach\fR \fINAME\fR \fIDEVICE\fR\&.\&.\&.
252 .RS 4
253 Persistently attach one or more devices to a seat\&. The devices should be specified via device paths in the
254 /sys
255 file system\&. To create a new seat, attach at least one graphics card to a previously unused seat name\&. Seat names may consist only of a\-z, A\-Z, 0\-9,
256 "\-"
257 and
258 "_"
259 and must be prefixed with
260 "seat"\&. To drop assignment of a device to a specific seat, just reassign it to a different seat, or use
261 \fBflush\-devices\fR\&.
262 .RE
263 .PP
264 \fBflush\-devices\fR
265 .RS 4
266 Removes all device assignments previously created with
267 \fBattach\fR\&. After this call, only automatically generated seats will remain, and all seat hardware is assigned to them\&.
268 .RE
269 .PP
270 \fBterminate\-seat\fR \fINAME\fR\&.\&.\&.
271 .RS 4
272 Terminates all sessions on a seat\&. This kills all processes of all sessions on the seat and deallocates all runtime resources attached to them\&.
273 .RE
274 .SH "EXIT STATUS"
275 .PP
276 On success, 0 is returned, a non\-zero failure code otherwise\&.
277 .SH "ENVIRONMENT"
278 .PP
279 \fI$SYSTEMD_PAGER\fR
280 .RS 4
281 Pager to use when
282 \fB\-\-no\-pager\fR
283 is not given; overrides
284 \fI$PAGER\fR\&. Setting this to an empty string or the value
285 "cat"
286 is equivalent to passing
287 \fB\-\-no\-pager\fR\&.
288 .RE
289 .PP
290 \fI$SYSTEMD_LESS\fR
291 .RS 4
292 Override the default options passed to
293 \fBless\fR
294 ("FRSXMK")\&.
295 .RE
296 .SH "SEE ALSO"
297 .PP
298 \fBsystemd\fR(1),
299 \fBsystemctl\fR(1),
300 \fBsystemd-logind.service\fR(8),
301 \fBlogind.conf\fR(5)