Debian Codegraph @

upstream/debian-trixie/man1/systemctl.1

raw
1 '\" t
2 .TH "SYSTEMCTL" "1" "" "systemd 257.13" "systemctl"
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 systemctl \- Control the systemd system and service manager
24 .SH "SYNOPSIS"
25 .HP \w'\fBsystemctl\fR\ 'u
26 \fBsystemctl\fR [OPTIONS...] COMMAND [UNIT...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBsystemctl\fR
30 may be used to introspect and control the state of the
31 "systemd"
32 system and service manager\&. Please refer to
33 \fBsystemd\fR(1)
34 for an introduction into the basic concepts and functionality this tool manages\&.
35 .SH "COMMANDS"
36 .PP
37 The following commands are understood:
38 .SS "Unit Commands (Introspection and Modification)"
39 .PP
40 \fBlist\-units\fR [\fIPATTERN\fR\&...]
41 .RS 4
42 List units that
43 \fBsystemd\fR
44 currently has in memory\&. This includes units that are either referenced directly or through a dependency, units that are pinned by applications programmatically, or units that were active in the past and have failed\&. By default, only units which are active, have pending jobs, or have failed are shown; this can be changed with option
45 \fB\-\-all\fR\&. If one or more
46 \fIPATTERN\fRs are specified, only units matching one of them are shown\&. The units that are shown are additionally filtered by
47 \fB\-\-type=\fR
48 and
49 \fB\-\-state=\fR
50 if those options are specified\&.
51 .sp
52 Note that this command does not show unit templates, but only instances of unit templates\&. Units templates that are not instantiated are not runnable, and will thus never show up in the output of this command\&. Specifically this means that
53 foo@\&.service
54 will never be shown in this list \(em unless instantiated, e\&.g\&. as
55 foo@bar\&.service\&. Use
56 \fBlist\-unit\-files\fR
57 (see below) for listing installed unit template files\&.
58 .sp
59 Produces output similar to
60 .sp
61 .if n \{\
62 .RS 4
63 .\}
64 .nf
65 UNIT LOAD ACTIVE SUB DESCRIPTION
66 sys\-module\-fuse\&.device loaded active plugged /sys/module/fuse
67 \-\&.mount loaded active mounted Root Mount
68 boot\-efi\&.mount loaded active mounted /boot/efi
69 systemd\-journald\&.service loaded active running Journal Service
70 systemd\-logind\&.service loaded active running Login Service
71 ● user@1000\&.service loaded failed failed User Manager for UID 1000
72 \&...
73 systemd\-tmpfiles\-clean\&.timer loaded active waiting Daily Cleanup of Temporary Directories
74
75 LOAD = Reflects whether the unit definition was properly loaded\&.
76 ACTIVE = The high\-level unit activation state, i\&.e\&. generalization of SUB\&.
77 SUB = The low\-level unit activation state, values depend on unit type\&.
78
79 123 loaded units listed\&. Pass \-\-all to see loaded but inactive units, too\&.
80 To show all installed unit files use \*(Aqsystemctl list\-unit\-files\*(Aq\&.
81 .fi
82 .if n \{\
83 .RE
84 .\}
85 .sp
86 The header and the last unit of a given type are underlined if the terminal supports that\&. A colored dot is shown next to services which were masked, not found, or otherwise failed\&.
87 .sp
88 The LOAD column shows the load state, one of
89 \fBloaded\fR,
90 \fBnot\-found\fR,
91 \fBbad\-setting\fR,
92 \fBerror\fR,
93 \fBmasked\fR\&. The ACTIVE columns shows the general unit state, one of the following:
94 .sp
95 .it 1 an-trap
96 .nr an-no-space-flag 1
97 .nr an-break-flag 1
98 .br
99 .B Table\ \&1.\ \&Unit ACTIVE states
100 .TS
101 allbox tab(:);
102 lB lB.
103 T{
104 State
105 T}:T{
106 Description
107 T}
108 .T&
109 l l
110 l l
111 l l
112 l l
113 l l
114 l l
115 l l
116 l l.
117 T{
118 \fIactive\fR
119 T}:T{
120 Started, bound, plugged in, \&..., depending on the unit type\&.
121 T}
122 T{
123 \fIinactive\fR
124 T}:T{
125 Stopped, unbound, unplugged, \&..., depending on the unit type\&.
126 T}
127 T{
128 \fIfailed\fR
129 T}:T{
130 Similar to \fBinactive\fR, but the unit failed in some way (process returned error code on exit, crashed, an operation timed out, or after too many restarts)\&.
131 T}
132 T{
133 \fIactivating\fR
134 T}:T{
135 Changing from \fBinactive\fR to \fBactive\fR\&.
136 T}
137 T{
138 \fIdeactivating\fR
139 T}:T{
140 Changing from \fBactive\fR to \fBinactive\fR\&.
141 T}
142 T{
143 \fImaintenance\fR
144 T}:T{
145 Unit is \fBinactive\fR and a maintenance operation is in progress\&.
146 T}
147 T{
148 \fIreloading\fR
149 T}:T{
150 Unit is \fBactive\fR and it is reloading its configuration\&.
151 T}
152 T{
153 \fIrefreshing\fR
154 T}:T{
155 Unit is \fBactive\fR and a new mount is being activated in its namespace\&.
156 T}
157 .TE
158 .sp 1
159 The SUB column shows the unit\-type\-specific detailed state of the unit, possible values vary by unit type\&. The list of possible LOAD, ACTIVE, and SUB states is not constant and new systemd releases may both add and remove values\&.
160 .sp
161 .if n \{\
162 .RS 4
163 .\}
164 .nf
165 systemctl \-\-state=help
166 .fi
167 .if n \{\
168 .RE
169 .\}
170 .sp
171 command may be used to display the current set of possible values\&.
172 .sp
173 This is the default command\&.
174 .RE
175 .PP
176 \fBlist\-automounts\fR [\fIPATTERN\fR\&...]
177 .RS 4
178 List automount units currently in memory, ordered by mount path\&. If one or more
179 \fIPATTERN\fRs are specified, only automount units matching one of them are shown\&. Produces output similar to
180 .sp
181 .if n \{\
182 .RS 4
183 .\}
184 .nf
185 WHAT WHERE MOUNTED IDLE TIMEOUT UNIT
186 /dev/sdb1 /mnt/test no 120s mnt\-test\&.automount
187 binfmt_misc /proc/sys/fs/binfmt_misc yes 0 proc\-sys\-fs\-binfmt_misc\&.automount
188
189 2 automounts listed\&.
190 .fi
191 .if n \{\
192 .RE
193 .\}
194 .sp
195 Also see
196 \fB\-\-show\-types\fR,
197 \fB\-\-all\fR, and
198 \fB\-\-state=\fR\&.
199 .sp
200 Added in version 252\&.
201 .RE
202 .PP
203 \fBlist\-paths\fR [\fIPATTERN\fR\&...]
204 .RS 4
205 List path units currently in memory, ordered by path\&. If one or more
206 \fIPATTERN\fRs are specified, only path units matching one of them are shown\&. Produces output similar to
207 .sp
208 .if n \{\
209 .RS 4
210 .\}
211 .nf
212 PATH CONDITION UNIT ACTIVATES
213 /run/systemd/ask\-password DirectoryNotEmpty systemd\-ask\-password\-plymouth\&.path systemd\-ask\-password\-plymouth\&.service
214 /run/systemd/ask\-password DirectoryNotEmpty systemd\-ask\-password\-wall\&.path systemd\-ask\-password\-wall\&.service
215 /var/cache/cups/org\&.cups\&.cupsd PathExists cups\&.path cups\&.service
216
217 3 paths listed\&.
218 .fi
219 .if n \{\
220 .RE
221 .\}
222 .sp
223 Also see
224 \fB\-\-show\-types\fR,
225 \fB\-\-all\fR, and
226 \fB\-\-state=\fR\&.
227 .sp
228 Added in version 254\&.
229 .RE
230 .PP
231 \fBlist\-sockets\fR [\fIPATTERN\fR\&...]
232 .RS 4
233 List socket units currently in memory, ordered by listening address\&. If one or more
234 \fIPATTERN\fRs are specified, only socket units matching one of them are shown\&. Produces output similar to
235 .sp
236 .if n \{\
237 .RS 4
238 .\}
239 .nf
240 LISTEN UNIT ACTIVATES
241 kobject\-uevent 1 systemd\-udevd\-kernel\&.socket systemd\-udevd\&.service
242 /dev/rfkill systemd\-rfkill\&.socket systemd\-rfkill\&.service
243 \&...
244
245 5 sockets listed\&.
246 .fi
247 .if n \{\
248 .RE
249 .\}
250 .sp
251 Note: because the addresses might contains spaces, this output is not suitable for programmatic consumption\&.
252 .sp
253 Also see
254 \fB\-\-show\-types\fR,
255 \fB\-\-all\fR, and
256 \fB\-\-state=\fR\&.
257 .sp
258 Added in version 202\&.
259 .RE
260 .PP
261 \fBlist\-timers\fR [\fIPATTERN\fR\&...]
262 .RS 4
263 List timer units currently in memory, ordered by the time they elapse next\&. If one or more
264 \fIPATTERN\fRs are specified, only units matching one of them are shown\&. Produces output similar to
265 .sp
266 .if n \{\
267 .RS 4
268 .\}
269 .nf
270 NEXT LEFT LAST PASSED UNIT ACTIVATES
271 \- \- Thu 2017\-02\-23 13:40:29 EST 3 days ago ureadahead\-stop\&.timer ureadahead\-stop\&.service
272 Sun 2017\-02\-26 18:55:42 EST 1min 14s left Thu 2017\-02\-23 13:54:44 EST 3 days ago systemd\-tmpfiles\-clean\&.timer systemd\-tmpfiles\-clean\&.service
273 Sun 2017\-02\-26 20:37:16 EST 1h 42min left Sun 2017\-02\-26 11:56:36 EST 6h ago apt\-daily\&.timer apt\-daily\&.service
274 Sun 2017\-02\-26 20:57:49 EST 2h 3min left Sun 2017\-02\-26 11:56:36 EST 6h ago snapd\&.refresh\&.timer snapd\&.refresh\&.service
275 .fi
276 .if n \{\
277 .RE
278 .\}
279 .sp
280 \fINEXT\fR
281 shows the next time the timer will run\&.
282 .sp
283 \fILEFT\fR
284 shows how long till the next time the timer runs\&.
285 .sp
286 \fILAST\fR
287 shows the last time the timer ran\&.
288 .sp
289 \fIPASSED\fR
290 shows how long has passed since the timer last ran\&.
291 .sp
292 \fIUNIT\fR
293 shows the name of the timer
294 .sp
295 \fIACTIVATES\fR
296 shows the name the service the timer activates when it runs\&.
297 .sp
298 Also see
299 \fB\-\-all\fR
300 and
301 \fB\-\-state=\fR\&.
302 .sp
303 Added in version 209\&.
304 .RE
305 .PP
306 \fBis\-active \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
307 .RS 4
308 Check whether any of the specified units are active (i\&.e\&. running)\&. Returns an exit code
309 \fB0\fR
310 if at least one is active, or non\-zero otherwise\&. Unless
311 \fB\-\-quiet\fR
312 is specified, this will also print the current unit state to standard output\&.
313 .RE
314 .PP
315 \fBis\-failed \fR\fB[\fIPATTERN\fR\&...]\fR
316 .RS 4
317 Check whether any of the specified units is in the "failed" state\&. If no unit is specified, check whether there are any failed units, which corresponds to the
318 "degraded"
319 state returned by
320 \fBis\-system\-running\fR\&. Returns an exit code
321 \fB0\fR
322 if at least one has failed, non\-zero otherwise\&. Unless
323 \fB\-\-quiet\fR
324 is specified, this will also print the current unit or system state to standard output\&.
325 .sp
326 Added in version 197\&.
327 .RE
328 .PP
329 \fBstatus\fR [\fIPATTERN\fR\&...|\fIPID\fR\&...]]
330 .RS 4
331 Show runtime status information about the whole system or about one or more units followed by most recent log data from the journal\&. If no positional arguments are specified, and no unit filter is given with
332 \fB\-\-type=\fR,
333 \fB\-\-state=\fR, or
334 \fB\-\-failed\fR, shows the status of the whole system\&. If combined with
335 \fB\-\-all\fR, follows that with the status of all units\&. If positional arguments are specified, each positional argument is treated as either a unit name to show, or a glob pattern to show units whose names match that pattern, or a PID to show the unit containing that PID\&. When
336 \fB\-\-type=\fR,
337 \fB\-\-state=\fR, or
338 \fB\-\-failed\fR
339 are used, units are additionally filtered by the TYPE and ACTIVE state\&.
340 .sp
341 This function is intended to generate human\-readable output\&. If you are looking for computer\-parsable output, use
342 \fBshow\fR
343 instead\&. By default, this function only shows 10 lines of output and ellipsizes lines to fit in the terminal window\&. This can be changed with
344 \fB\-\-lines\fR
345 and
346 \fB\-\-full\fR, see above\&. In addition,
347 \fBjournalctl \-\-unit=\fR\fB\fINAME\fR\fR
348 or
349 \fBjournalctl \-\-user\-unit=\fR\fB\fINAME\fR\fR
350 use a similar filter for messages and might be more convenient\&.
351 .sp
352 Note that this operation only displays
353 \fIruntime\fR
354 status, i\&.e\&. information about the current invocation of the unit (if it is running) or the most recent invocation (if it is not running anymore, and has not been released from memory)\&. Information about earlier invocations, invocations from previous system boots, or prior invocations that have already been released from memory may be retrieved via
355 \fBjournalctl \-\-unit=\fR\&.
356 .sp
357 systemd implicitly loads units as necessary, so just running the
358 \fBstatus\fR
359 will attempt to load a file\&. The command is thus not useful for determining if something was already loaded or not\&. The units may possibly also be quickly unloaded after the operation is completed if there\*(Aqs no reason to keep it in memory thereafter\&.
360 .PP
361 \fBExample\ \&1.\ \&Example output from systemctl status\fR
362 .sp
363 .if n \{\
364 .RS 4
365 .\}
366 .nf
367 $ systemctl status bluetooth
368 ● bluetooth\&.service \- Bluetooth service
369 Loaded: loaded (/usr/lib/systemd/system/bluetooth\&.service; enabled; preset: enabled)
370 Active: active (running) since Wed 2017\-01\-04 13:54:04 EST; 1 weeks 0 days ago
371 Docs: man:bluetoothd(8)
372 Main PID: 930 (bluetoothd)
373 Status: "Running"
374 Tasks: 1
375 Memory: 648\&.0K
376 CPU: 435ms
377 CGroup: /system\&.slice/bluetooth\&.service
378 └─930 /usr/lib/bluetooth/bluetoothd
379
380 Jan 12 10:46:45 example\&.com bluetoothd[8900]: Not enough free handles to register service
381 Jan 12 10:46:45 example\&.com bluetoothd[8900]: Current Time Service could not be registered
382 Jan 12 10:46:45 example\&.com bluetoothd[8900]: gatt\-time\-server: Input/output error (5)
383 .fi
384 .if n \{\
385 .RE
386 .\}
387 .sp
388 The dot ("●") uses color on supported terminals to summarize the unit state at a glance\&. Along with its color, its shape varies according to its state:
389 "inactive"
390 or
391 "maintenance"
392 is a white circle ("○"),
393 "active"
394 is a green dot ("●"),
395 "deactivating"
396 is a white dot,
397 "failed"
398 or
399 "error"
400 is a red cross ("\(mu"), and
401 "reloading"
402 or
403 "refreshing"
404 is a green clockwise circle arrow ("↻")\&.
405 .sp
406 The "Loaded:" line in the output will show
407 "loaded"
408 if the unit has been loaded into memory\&. Other possible values for "Loaded:" include:
409 "error"
410 if there was a problem loading it,
411 "not\-found"
412 if no unit file was found for this unit,
413 "bad\-setting"
414 if an essential unit file setting could not be parsed and
415 "masked"
416 if the unit file has been masked\&. Along with showing the path to the unit file, this line will also show the enablement state\&. Enabled units are included in the dependency network between units, and thus are started at boot or via some other form of activation\&. See the full table of possible enablement states \(em including the definition of
417 "masked"
418 \(em in the documentation for the
419 \fBis\-enabled\fR
420 command\&.
421 .sp
422 The "Active:" line shows active state\&. The value is usually
423 "active"
424 or
425 "inactive"\&. Active could mean started, bound, plugged in, etc depending on the unit type\&. The unit could also be in process of changing states, reporting a state of
426 "activating"
427 or
428 "deactivating"\&. A special
429 "failed"
430 state is entered when the service failed in some way, such as a crash, exiting with an error code or timing out\&. If the failed state is entered the cause will be logged for later reference\&.
431 .RE
432 .PP
433 \fBshow\fR [\fIPATTERN\fR\&...|\fIJOB\fR\&...]
434 .RS 4
435 Show properties of one or more units, jobs, or the manager itself\&. If no argument is specified, properties of the manager will be shown\&. If a unit name is specified, properties of the unit are shown, and if a job ID is specified, properties of the job are shown\&. By default, empty properties are suppressed\&. Use
436 \fB\-\-all\fR
437 to show those too\&. To select specific properties to show, use
438 \fB\-\-property=\fR\&. This command is intended to be used whenever computer\-parsable output is required\&. Use
439 \fBstatus\fR
440 if you are looking for formatted human\-readable output\&.
441 .sp
442 Many properties shown by
443 \fBsystemctl show\fR
444 map directly to configuration settings of the system and service manager and its unit files\&. Note that the properties shown by the command are generally more low\-level, normalized versions of the original configuration settings and expose runtime state in addition to configuration\&. For example, properties shown for service units include the service\*(Aqs current main process identifier as
445 "MainPID"
446 (which is runtime state), and time settings are always exposed as properties ending in the
447 "\&...USec"
448 suffix even if a matching configuration options end in
449 "\&...Sec", because microseconds is the normalized time unit used internally by the system and service manager\&.
450 .sp
451 For details about many of these properties, see the documentation of the D\-Bus interface backing these properties, see
452 \fBorg.freedesktop.systemd1\fR(5)\&.
453 .RE
454 .PP
455 \fBcat \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
456 .RS 4
457 Show backing files of one or more units\&. Prints the "fragment" and "drop\-ins" (source files) of units\&. Each file is preceded by a comment which includes the file name\&. Note that this shows the contents of the backing files on disk, which might not match the system manager\*(Aqs understanding of these units if any unit files were updated on disk and the
458 \fBdaemon\-reload\fR
459 command was not issued since\&.
460 .sp
461 Added in version 209\&.
462 .RE
463 .PP
464 \fBhelp \fR\fB\fIPATTERN\fR\fR\fB\&...|\fR\fB\fIPID\fR\fR\fB\&...\fR
465 .RS 4
466 Show manual pages for one or more units, if available\&. If a PID is given, the manual pages for the unit the process belongs to are shown\&.
467 .sp
468 Added in version 185\&.
469 .RE
470 .PP
471 \fBlist\-dependencies\fR [\fIUNIT\fR\&.\&.\&.]
472 .RS 4
473 Shows units required and wanted by the specified units\&. This recursively lists units following the
474 \fIRequires=\fR,
475 \fIRequisite=\fR,
476 \fIWants=\fR,
477 \fIConsistsOf=\fR,
478 \fIBindsTo=\fR, and
479 \fIUpholds=\fR
480 dependencies\&. If no units are specified,
481 default\&.target
482 is implied\&.
483 .sp
484 The units that are shown are additionally filtered by
485 \fB\-\-type=\fR
486 and
487 \fB\-\-state=\fR
488 if those options are specified\&. Note that we will not be able to use a tree structure in this case, so
489 \fB\-\-plain\fR
490 is implied\&.
491 .sp
492 By default, only target units are recursively expanded\&. When
493 \fB\-\-all\fR
494 is passed, all other units are recursively expanded as well\&.
495 .sp
496 Options
497 \fB\-\-reverse\fR,
498 \fB\-\-after\fR,
499 \fB\-\-before\fR
500 may be used to change what types of dependencies are shown\&.
501 .sp
502 Note that this command only lists units currently loaded into memory by the service manager\&. In particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a specific unit, as it will not list the dependencies declared by units currently not loaded\&.
503 .sp
504 Added in version 198\&.
505 .RE
506 .PP
507 \fBstart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
508 .RS 4
509 Start (activate) one or more units specified on the command line\&.
510 .sp
511 Note that unit glob patterns expand to names of units currently in memory\&. Units which are not active and are not in a failed state usually are not in memory, and will not be matched by any pattern\&. In addition, in case of instantiated units, systemd is often unaware of the instance name until the instance has been started\&. Therefore, using glob patterns with
512 \fBstart\fR
513 has limited usefulness\&. Also, secondary alias names of units are not considered\&.
514 .sp
515 Option
516 \fB\-\-all\fR
517 may be used to also operate on inactive units which are referenced by other loaded units\&. Note that this is not the same as operating on "all" possible units, because as the previous paragraph describes, such a list is ill\-defined\&. Nevertheless,
518 \fBsystemctl start \-\-all \fR\fB\fIGLOB\fR\fR
519 may be useful if all the units that should match the pattern are pulled in by some target which is known to be loaded\&.
520 .RE
521 .PP
522 \fBstop \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
523 .RS 4
524 Stop (deactivate) one or more units specified on the command line\&.
525 .sp
526 This command will fail if the unit does not exist or if stopping of the unit is prohibited (see
527 \fIRefuseManualStop=\fR
528 in
529 \fBsystemd.unit\fR(5))\&. It will
530 \fInot\fR
531 fail if any of the commands configured to stop the unit (\fIExecStop=\fR, etc\&.) fail, because the manager will still forcibly terminate the unit\&.
532 .sp
533 If a unit that gets stopped can still be triggered by other units, a warning containing the names of the triggering units is shown\&.
534 \fB\-\-no\-warn\fR
535 can be used to suppress the warning\&.
536 .RE
537 .PP
538 \fBreload \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
539 .RS 4
540 Asks all units listed on the command line to reload their configuration\&. Note that this will reload the service\-specific configuration, not the unit configuration file of systemd\&. If you want systemd to reload the configuration file of a unit, use the
541 \fBdaemon\-reload\fR
542 command\&. In other words: for the example case of Apache, this will reload Apache\*(Aqs
543 httpd\&.conf
544 in the web server, not the
545 apache\&.service
546 systemd unit file\&.
547 .sp
548 This command should not be confused with the
549 \fBdaemon\-reload\fR
550 command\&.
551 .RE
552 .PP
553 \fBrestart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
554 .RS 4
555 Stop and then start one or more units specified on the command line\&. If the units are not running yet, they will be started\&.
556 .sp
557 Note that restarting a unit with this command does not necessarily flush out all of the unit\*(Aqs resources before it is started again\&. For example, the per\-service file descriptor storage facility (see
558 \fIFileDescriptorStoreMax=\fR
559 in
560 \fBsystemd.service\fR(5)) will remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and no jobs are pending anymore\&. If it is intended that the file descriptor store is flushed out, too, during a restart operation an explicit
561 \fBsystemctl stop\fR
562 command followed by
563 \fBsystemctl start\fR
564 should be issued\&.
565 .RE
566 .PP
567 \fBtry\-restart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
568 .RS 4
569 Stop and then start one or more units specified on the command line if the units are running\&. This does nothing if units are not running\&.
570 .RE
571 .PP
572 \fBreload\-or\-restart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
573 .RS 4
574 Reload one or more units if they support it\&. If not, stop and then start them instead\&. If the units are not running yet, they will be started\&.
575 .sp
576 This has a slightly differing functionality when used in combination with
577 \fB\-\-marked\fR, see below\&.
578 .RE
579 .PP
580 \fBtry\-reload\-or\-restart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
581 .RS 4
582 Reload one or more units if they support it\&. If not, stop and then start them instead\&. This does nothing if the units are not running\&.
583 .sp
584 Added in version 229\&.
585 .RE
586 .PP
587 \fBisolate \fR\fB\fIUNIT\fR\fR
588 .RS 4
589 Start the unit specified on the command line and its dependencies and stop all others, unless they have
590 \fBIgnoreOnIsolate=yes\fR
591 (see
592 \fBsystemd.unit\fR(5))\&. If a unit name with no extension is given, an extension of
593 "\&.target"
594 will be assumed\&.
595 .sp
596 This command is dangerous, since it will immediately stop processes that are not enabled in the new target, possibly including the graphical environment or terminal you are currently using\&.
597 .sp
598 Note that this operation is allowed only on units where
599 \fBAllowIsolate=\fR
600 is enabled\&. See
601 \fBsystemd.unit\fR(5)
602 for details\&.
603 .RE
604 .PP
605 \fBkill \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
606 .RS 4
607 Send a UNIX process signal to one or more processes of the unit\&. Use
608 \fB\-\-kill\-whom=\fR
609 to select which process to send the signal to\&. Use
610 \fB\-\-signal=\fR
611 to select the signal to send\&. Combine with
612 \fB\-\-kill\-value=\fR
613 to enqueue a POSIX Realtime Signal with an associated value\&.
614 .RE
615 .PP
616 \fBclean \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
617 .RS 4
618 Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units\&. Use
619 \fB\-\-what=\fR
620 to select which kind of resource to remove\&. For service units this may be used to remove the directories configured with
621 \fIConfigurationDirectory=\fR,
622 \fIStateDirectory=\fR,
623 \fICacheDirectory=\fR,
624 \fILogsDirectory=\fR
625 and
626 \fIRuntimeDirectory=\fR, see
627 \fBsystemd.exec\fR(5)
628 for details\&. It may also be used to clear the file descriptor store as enabled via
629 \fIFileDescriptorStoreMax=\fR, see
630 \fBsystemd.service\fR(5)
631 for details\&. For timer units this may be used to clear out the persistent timestamp data if
632 \fIPersistent=\fR
633 is used and
634 \fB\-\-what=state\fR
635 is selected, see
636 \fBsystemd.timer\fR(5)\&. This command only applies to units that use either of these settings\&. If
637 \fB\-\-what=\fR
638 is not specified, the cache and runtime data as well as the file descriptor store are removed (as these three types of resources are generally redundant and reproducible on the next invocation of the unit)\&. Multiple values can be seperated by commas\&. Note that the specified units must be stopped to invoke this operation\&.
639 .sp
640 .it 1 an-trap
641 .nr an-no-space-flag 1
642 .nr an-break-flag 1
643 .br
644 .B Table\ \&2.\ \& Possible values for \-\-what=
645 .TS
646 allbox tab(:);
647 lB lB.
648 T{
649 Value
650 T}:T{
651 Unit Setting
652 T}
653 .T&
654 l l
655 l l
656 l l
657 l l
658 l l
659 l l
660 l l
661 l l.
662 T{
663 "runtime"
664 T}:T{
665 \fIRuntimeDirectory=\fR
666 T}
667 T{
668 "state"
669 T}:T{
670 \fIStateDirectory=\fR
671 T}
672 T{
673 "cache"
674 T}:T{
675 \fICacheDirectory=\fR
676 T}
677 T{
678 "logs"
679 T}:T{
680 \fILogsDirectory=\fR
681 T}
682 T{
683 "configuration"
684 T}:T{
685 \fIConfigurationDirectory=\fR
686 T}
687 T{
688 "fdstore"
689 T}:T{
690 \fIFileDescriptorStorePreserve=\fR
691 T}
692 T{
693 "all"
694 T}:T{
695 All of the above
696 T}
697 T{
698 "help"
699 T}:T{
700 Show the supported values and exit
701 T}
702 .TE
703 .sp 1
704 Added in version 243\&.
705 .RE
706 .PP
707 \fBfreeze \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
708 .RS 4
709 Freeze one or more units specified on the command line using cgroup freezer
710 .sp
711 Freezing the unit will cause all processes contained within the cgroup corresponding to the unit to be suspended\&. Being suspended means that unit\*(Aqs processes will not be scheduled to run on CPU until thawed\&. Note that this command is supported only on systems that use unified cgroup hierarchy\&. Unit is automatically thawed just before we execute a job against the unit, e\&.g\&. before the unit is stopped\&.
712 .sp
713 Added in version 246\&.
714 .RE
715 .PP
716 \fBthaw \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
717 .RS 4
718 Thaw (unfreeze) one or more units specified on the command line\&.
719 .sp
720 This is the inverse operation to the
721 \fBfreeze\fR
722 command and resumes the execution of processes in the unit\*(Aqs cgroup\&.
723 .sp
724 Added in version 246\&.
725 .RE
726 .PP
727 \fBset\-property \fR\fB\fIUNIT\fR\fR\fB \fR\fB\fIPROPERTY\fR\fR\fB=\fR\fB\fIVALUE\fR\fR\fB\&...\fR
728 .RS 4
729 Set the specified unit properties at runtime where this is supported\&. This allows changing configuration parameter properties such as resource control settings at runtime\&. Not all properties may be changed at runtime, but many resource control settings (primarily those in
730 \fBsystemd.resource-control\fR(5)) may\&. The changes are applied immediately, and stored on disk for future boots, unless
731 \fB\-\-runtime\fR
732 is passed, in which case the settings only apply until the next reboot\&. The syntax of the property assignment follows closely the syntax of assignments in unit files\&.
733 .sp
734 Example:
735 \fBsystemctl set\-property foobar\&.service CPUWeight=200\fR
736 .sp
737 If the specified unit appears to be inactive, the changes will be only stored on disk as described previously hence they will be effective when the unit will be started\&.
738 .sp
739 Note that this command allows changing multiple properties at the same time, which is preferable over setting them individually\&.
740 .sp
741 Example:
742 \fBsystemctl set\-property foobar\&.service CPUWeight=200 MemoryMax=2G IPAccounting=yes\fR
743 .sp
744 Like with unit file configuration settings, assigning an empty setting usually resets a property to its defaults\&.
745 .sp
746 Example:
747 \fBsystemctl set\-property avahi\-daemon\&.service IPAddressDeny=\fR
748 .sp
749 Added in version 206\&.
750 .RE
751 .PP
752 \fBbind\fR \fIUNIT\fR \fIPATH\fR [\fIPATH\fR]
753 .RS 4
754 Bind\-mounts a file or directory from the host into the specified unit\*(Aqs mount namespace\&. The first path argument is the source file or directory on the host, the second path argument is the destination file or directory in the unit\*(Aqs mount namespace\&. When the latter is omitted, the destination path in the unit\*(Aqs mount namespace is the same as the source path on the host\&. When combined with the
755 \fB\-\-read\-only\fR
756 switch, a ready\-only bind mount is created\&. When combined with the
757 \fB\-\-mkdir\fR
758 switch, the destination path is first created before the mount is applied\&.
759 .sp
760 Note that this option is currently only supported for units that run within a mount namespace (e\&.g\&.: with
761 \fBRootImage=\fR,
762 \fBPrivateMounts=\fR, etc\&.)\&. This command supports bind\-mounting directories, regular files, device nodes,
763 \fBAF_UNIX\fR
764 socket nodes, as well as FIFOs\&. The bind mount is ephemeral, and it is undone as soon as the current unit process exists\&. Note that the namespace mentioned here, where the bind mount will be added to, is the one where the main service process runs\&. Other processes (those exececuted by
765 \fBExecReload=\fR,
766 \fBExecStartPre=\fR, etc\&.) run in distinct namespaces\&.
767 .sp
768 If supported by the kernel, any prior mount on the selected target will be replaced by the new mount\&. If not supported, any prior mount will be over\-mounted, but remain pinned and inaccessible\&.
769 .sp
770 Added in version 248\&.
771 .RE
772 .PP
773 \fBmount\-image\fR \fIUNIT\fR \fIIMAGE\fR [\fIPATH\fR [\fIPARTITION_NAME\fR:\fIMOUNT_OPTIONS\fR]]
774 .RS 4
775 Mounts an image from the host into the specified unit\*(Aqs mount namespace\&. The first path argument is the source image on the host, the second path argument is the destination directory in the unit\*(Aqs mount namespace (i\&.e\&. inside
776 \fBRootImage=\fR/\fBRootDirectory=\fR)\&. The following argument, if any, is interpreted as a colon\-separated tuple of partition name and comma\-separated list of mount options for that partition\&. The format is the same as the service
777 \fBMountImages=\fR
778 setting\&. When combined with the
779 \fB\-\-read\-only\fR
780 switch, a ready\-only mount is created\&. When combined with the
781 \fB\-\-mkdir\fR
782 switch, the destination path is first created before the mount is applied\&.
783 .sp
784 Note that this option is currently only supported for units that run within a mount namespace (i\&.e\&. with
785 \fBRootImage=\fR,
786 \fBPrivateMounts=\fR, etc\&.)\&. Note that the namespace mentioned here where the image mount will be added to, is the one where the main service process runs\&. Note that the namespace mentioned here, where the bind mount will be added to, is the one where the main service process runs\&. Other processes (those exececuted by
787 \fBExecReload=\fR,
788 \fBExecStartPre=\fR, etc\&.) run in distinct namespaces\&.
789 .sp
790 If supported by the kernel, any prior mount on the selected target will be replaced by the new mount\&. If not supported, any prior mount will be over\-mounted, but remain pinned and inaccessible\&.
791 .sp
792 Example:
793 .sp
794 .if n \{\
795 .RS 4
796 .\}
797 .nf
798 systemctl mount\-image foo\&.service /tmp/img\&.raw /var/lib/image root:ro,nosuid
799 .fi
800 .if n \{\
801 .RE
802 .\}
803 .sp
804
805 .sp
806 .if n \{\
807 .RS 4
808 .\}
809 .nf
810 systemctl mount\-image \-\-mkdir bar\&.service /tmp/img\&.raw /var/lib/baz/img
811 .fi
812 .if n \{\
813 .RE
814 .\}
815 .sp
816 Added in version 248\&.
817 .RE
818 .PP
819 \fBservice\-log\-level\fR \fISERVICE\fR [\fILEVEL\fR]
820 .RS 4
821 If the
822 \fILEVEL\fR
823 argument is not given, print the current log level as reported by service
824 \fISERVICE\fR\&.
825 .sp
826 If the optional argument
827 \fILEVEL\fR
828 is provided, then change the current log level of the service to
829 \fILEVEL\fR\&. The log level should be a typical syslog log level, i\&.e\&. a value in the range 0\&...7 or one of the strings
830 \fBemerg\fR,
831 \fBalert\fR,
832 \fBcrit\fR,
833 \fBerr\fR,
834 \fBwarning\fR,
835 \fBnotice\fR,
836 \fBinfo\fR,
837 \fBdebug\fR; see
838 \fBsyslog\fR(3)
839 for details\&.
840 .sp
841 The service must have the appropriate
842 \fIBusName=\fR\fI\fIdestination\fR\fR
843 property and also implement the generic
844 \fBorg.freedesktop.LogControl1\fR(5)
845 interface\&. (systemctl
846 will use the generic D\-Bus protocol to access the
847 org\&.freedesktop\&.LogControl1\&.LogLevel
848 interface for the D\-Bus name
849 \fIdestination\fR\&.)
850 .sp
851 Added in version 247\&.
852 .RE
853 .PP
854 \fBservice\-log\-target\fR \fISERVICE\fR [\fITARGET\fR]
855 .RS 4
856 If the
857 \fITARGET\fR
858 argument is not given, print the current log target as reported by service
859 \fISERVICE\fR\&.
860 .sp
861 If the optional argument
862 \fITARGET\fR
863 is provided, then change the current log target of the service to
864 \fITARGET\fR\&. The log target should be one of the strings
865 \fBconsole\fR
866 (for log output to the service\*(Aqs standard error stream),
867 \fBkmsg\fR
868 (for log output to the kernel log buffer),
869 \fBjournal\fR
870 (for log output to
871 \fBsystemd-journald.service\fR(8)
872 using the native journal protocol),
873 \fBsyslog\fR
874 (for log output to the classic syslog socket
875 /dev/log),
876 \fBnull\fR
877 (for no log output whatsoever) or
878 \fBauto\fR
879 (for an automatically determined choice, typically equivalent to
880 \fBconsole\fR
881 if the service is invoked interactively, and
882 \fBjournal\fR
883 or
884 \fBsyslog\fR
885 otherwise)\&.
886 .sp
887 For most services, only a small subset of log targets make sense\&. In particular, most "normal" services should only implement
888 \fBconsole\fR,
889 \fBjournal\fR, and
890 \fBnull\fR\&. Anything else is only appropriate for low\-level services that are active in very early boot before proper logging is established\&.
891 .sp
892 The service must have the appropriate
893 \fIBusName=\fR\fI\fIdestination\fR\fR
894 property and also implement the generic
895 \fBorg.freedesktop.LogControl1\fR(5)
896 interface\&. (systemctl
897 will use the generic D\-Bus protocol to access the
898 org\&.freedesktop\&.LogControl1\&.LogLevel
899 interface for the D\-Bus name
900 \fIdestination\fR\&.)
901 .sp
902 Added in version 247\&.
903 .RE
904 .PP
905 \fBreset\-failed [\fR\fB\fIPATTERN\fR\fR\fB\&...]\fR
906 .RS 4
907 Reset the
908 "failed"
909 state of the specified units, or if no unit name is passed, reset the state of all units\&. When a unit fails in some way (i\&.e\&. process exiting with non\-zero error code, terminating abnormally or timing out), it will automatically enter the
910 "failed"
911 state and its exit code and status is recorded for introspection by the administrator until the service is stopped/re\-started or reset with this command\&.
912 .sp
913 In addition to resetting the
914 "failed"
915 state of a unit it also resets various other per\-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart counter of service units\&. Thus, if a unit\*(Aqs start limit (as configured with
916 \fIStartLimitIntervalSec=\fR/\fIStartLimitBurst=\fR) is hit and the unit refuses to be started again, use this command to make it startable again\&.
917 .RE
918 .PP
919 \fBwhoami [\fR\fB\fIPID\fR\fR\fB\&...]\fR
920 .RS 4
921 Returns the units the processes referenced by the given PIDs belong to (one per line)\&. If no PID is specified returns the unit the
922 \fBsystemctl\fR
923 command is invoked in\&.
924 .sp
925 Added in version 254\&.
926 .RE
927 .SS "Unit File Commands"
928 .PP
929 \fBlist\-unit\-files\fR [\fIPATTERN\&...\fR]
930 .RS 4
931 List unit files installed on the system, in combination with their enablement state (as reported by
932 \fBis\-enabled\fR)\&. If one or more
933 \fIPATTERN\fRs are specified, only unit files whose name matches one of them are shown (patterns matching unit file system paths are not supported)\&.
934 .sp
935 Unlike
936 \fBlist\-units\fR
937 this command will list template units in addition to explicitly instantiated units\&.
938 .sp
939 Added in version 233\&.
940 .RE
941 .PP
942 \fBenable \fR\fB\fIUNIT\fR\fR\fB\&...\fR, \fBenable \fR\fB\fIPATH\fR\fR\fB\&...\fR
943 .RS 4
944 Enable one or more units or unit instances\&. This will create a set of symlinks, as encoded in the [Install] sections of the indicated unit files\&. After the symlinks have been created, the system manager configuration is reloaded (in a way equivalent to
945 \fBdaemon\-reload\fR), in order to ensure the changes are taken into account immediately\&. Note that this does
946 \fInot\fR
947 have the effect of also starting any of the units being enabled\&. If this is desired, combine this command with the
948 \fB\-\-now\fR
949 switch, or invoke
950 \fBstart\fR
951 with appropriate arguments later\&. Note that in case of unit instance enablement (i\&.e\&. enablement of units of the form
952 foo@bar\&.service), symlinks named the same as instances are created in the unit configuration directory, however they point to the single template unit file they are instantiated from\&.
953 .sp
954 This command expects either valid unit names (in which case various unit file directories are automatically searched for unit files with appropriate names), or absolute paths to unit files (in which case these files are read directly)\&. If a specified unit file is located outside of the usual unit file directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring it is found when requested by commands such as
955 \fBstart\fR\&. The file system where the linked unit files are located must be accessible when systemd is started (e\&.g\&. anything underneath
956 /home/
957 or
958 /var/
959 is not allowed, unless those directories are located on the root file system)\&.
960 .sp
961 This command will print the file system operations executed\&. This output may be suppressed by passing
962 \fB\-\-quiet\fR\&.
963 .sp
964 Note that this operation creates only the symlinks suggested in the [Install] section of the unit files\&. While this command is the recommended way to manipulate the unit configuration directory, the administrator is free to make additional changes manually by placing or removing symlinks below this directory\&. This is particularly useful to create configurations that deviate from the suggested default installation\&. In this case, the administrator must make sure to invoke
965 \fBdaemon\-reload\fR
966 manually as necessary, in order to ensure the changes are taken into account\&.
967 .sp
968 When using this operation on units without install information, a warning about it is shown\&.
969 \fB\-\-no\-warn\fR
970 can be used to suppress the warning\&.
971 .sp
972 Enabling units should not be confused with starting (activating) units, as done by the
973 \fBstart\fR
974 command\&. Enabling and starting units is orthogonal: units may be enabled without being started and started without being enabled\&. Enabling simply hooks the unit into various suggested places (for example, so that the unit is automatically started on boot or when a particular kind of hardware is plugged in)\&. Starting actually spawns the daemon process (in case of service units), or binds the socket (in case of socket units), and so on\&.
975 .sp
976 Depending on whether
977 \fB\-\-system\fR,
978 \fB\-\-user\fR,
979 \fB\-\-runtime\fR, or
980 \fB\-\-global\fR
981 is specified, this enables the unit for the system, for the calling user only, for only this boot of the system, or for all future logins of all users\&. Note that in the last case, no systemd daemon configuration is reloaded\&.
982 .sp
983 Using
984 \fBenable\fR
985 on masked units is not supported and results in an error\&.
986 .RE
987 .PP
988 \fBdisable \fR\fB\fIUNIT\fR\fR\fB\&...\fR
989 .RS 4
990 Disables one or more units\&. This removes all symlinks to the unit files backing the specified units from the unit configuration directory, and hence undoes any changes made by
991 \fBenable\fR
992 or
993 \fBlink\fR\&. Note that this removes
994 \fIall\fR
995 symlinks to matching unit files, including manually created symlinks, and not just those actually created by
996 \fBenable\fR
997 or
998 \fBlink\fR\&. Note that while
999 \fBdisable\fR
1000 undoes the effect of
1001 \fBenable\fR, the two commands are otherwise not symmetric, as
1002 \fBdisable\fR
1003 may remove more symlinks than a prior
1004 \fBenable\fR
1005 invocation of the same unit created\&.
1006 .sp
1007 This command expects valid unit names only, it does not accept paths to unit files\&.
1008 .sp
1009 In addition to the units specified as arguments, all units are disabled that are listed in the
1010 \fIAlso=\fR
1011 setting contained in the [Install] section of any of the unit files being operated on\&.
1012 .sp
1013 This command implicitly reloads the system manager configuration after completing the operation\&. Note that this command does not implicitly stop the units that are being disabled\&. If this is desired, either combine this command with the
1014 \fB\-\-now\fR
1015 switch, or invoke the
1016 \fBstop\fR
1017 command with appropriate arguments later\&.
1018 .sp
1019 This command will print information about the file system operations (symlink removals) executed\&. This output may be suppressed by passing
1020 \fB\-\-quiet\fR\&.
1021 .sp
1022 If a unit gets disabled but its triggering units are still active, a warning containing the names of the triggering units is shown\&.
1023 \fB\-\-no\-warn\fR
1024 can be used to suppress the warning\&.
1025 .sp
1026 When this command is used with
1027 \fB\-\-user\fR, the units being operated on might still be enabled in global scope, and thus get started automatically even after a successful disablement in user scope\&. In this case, a warning about it is shown, which can be suppressed using
1028 \fB\-\-no\-warn\fR\&.
1029 .sp
1030 This command honors
1031 \fB\-\-system\fR,
1032 \fB\-\-user\fR,
1033 \fB\-\-runtime\fR,
1034 \fB\-\-global\fR
1035 and
1036 \fB\-\-no\-warn\fR
1037 in a similar way as
1038 \fBenable\fR\&.
1039 .sp
1040 Added in version 238\&.
1041 .RE
1042 .PP
1043 \fBreenable \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1044 .RS 4
1045 Reenable one or more units, as specified on the command line\&. This is a combination of
1046 \fBdisable\fR
1047 and
1048 \fBenable\fR
1049 and is useful to reset the symlinks a unit file is enabled with to the defaults configured in its [Install] section\&. This command expects a unit name only, it does not accept paths to unit files\&.
1050 .sp
1051 This command implicitly reloads the system manager configuration after completing the operation\&. Note that this command does not implicitly restart the units that are being disabled\&. If this is desired, either combine this command with the
1052 \fB\-\-now\fR
1053 switch, or invoke the
1054 \fBtry\-restart\fR
1055 command with appropriate arguments later\&.
1056 .sp
1057 Added in version 238\&.
1058 .RE
1059 .PP
1060 \fBpreset \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1061 .RS 4
1062 Reset the enable/disable status of one or more unit files, as specified on the command line, to the defaults configured in the preset policy files\&. This has the same effect as
1063 \fBdisable\fR
1064 or
1065 \fBenable\fR, depending how the unit is listed in the preset files\&.
1066 .sp
1067 Use
1068 \fB\-\-preset\-mode=\fR
1069 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
1070 .sp
1071 If the unit carries no install information, it will be silently ignored by this command\&.
1072 \fIUNIT\fR
1073 must be the real unit name, any alias names are ignored silently\&.
1074 .sp
1075 For more information on the preset policy format, see
1076 \fBsystemd.preset\fR(5)\&.
1077 .sp
1078 Added in version 238\&.
1079 .RE
1080 .PP
1081 \fBpreset\-all\fR
1082 .RS 4
1083 Resets all installed unit files to the defaults configured in the preset policy file (see above)\&.
1084 .sp
1085 Use
1086 \fB\-\-preset\-mode=\fR
1087 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
1088 .sp
1089 Added in version 215\&.
1090 .RE
1091 .PP
1092 \fBis\-enabled \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1093 .RS 4
1094 Checks whether any of the specified unit files are enabled (as with
1095 \fBenable\fR)\&. Returns an exit code of 0 if at least one is enabled, non\-zero otherwise\&. Prints the current enable status (see table)\&. To suppress this output, use
1096 \fB\-\-quiet\fR\&. To show installation targets, use
1097 \fB\-\-full\fR\&.
1098 .sp
1099 .it 1 an-trap
1100 .nr an-no-space-flag 1
1101 .nr an-break-flag 1
1102 .br
1103 .B Table\ \&3.\ \& is\-enabled output
1104 .TS
1105 allbox tab(:);
1106 lB lB lB.
1107 T{
1108 Name
1109 T}:T{
1110 Description
1111 T}:T{
1112 Exit Code
1113 T}
1114 .T&
1115 l l l
1116 l ^ ^
1117 l l l
1118 l ^ ^
1119 l l l
1120 l l l
1121 l ^ ^
1122 l l l
1123 l l l
1124 l l l
1125 l l l
1126 l l l
1127 l l l
1128 l l l.
1129 T{
1130 "enabled"
1131 T}:T{
1132 Enabled via \&.wants/, \&.requires/ or \fIAlias=\fR symlinks (permanently in /etc/systemd/system/, or transiently in /run/systemd/system/)\&.
1133 T}:T{
1134 0
1135 T}
1136 T{
1137 "enabled\-runtime"
1138 T}::
1139 T{
1140 "linked"
1141 T}:T{
1142 Made available through one or more symlinks to the unit file (permanently in /etc/systemd/system/ or transiently in /run/systemd/system/), even though the unit file might reside outside of the unit file search path\&.
1143 T}:T{
1144 > 0
1145 T}
1146 T{
1147 "linked\-runtime"
1148 T}::
1149 T{
1150 "alias"
1151 T}:T{
1152 The name is an alias (symlink to another unit file)\&.
1153 T}:T{
1154 0
1155 T}
1156 T{
1157 "masked"
1158 T}:T{
1159 Completely disabled, so that any start operation on it fails (permanently in /etc/systemd/system/ or transiently in /run/systemd/systemd/)\&.
1160 T}:T{
1161 > 0
1162 T}
1163 T{
1164 "masked\-runtime"
1165 T}::
1166 T{
1167 "static"
1168 T}:T{
1169 The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section\&.
1170 T}:T{
1171 0
1172 T}
1173 T{
1174 "indirect"
1175 T}:T{
1176 The unit file itself is not enabled, but it has a non\-empty \fIAlso=\fR setting in the [Install] unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in \fIAlso=\fR\&. For template unit files, an instance different than the one specified in \fIDefaultInstance=\fR is enabled\&.
1177 T}:T{
1178 0
1179 T}
1180 T{
1181 "disabled"
1182 T}:T{
1183 The unit file is not enabled, but contains an [Install] section with installation instructions\&.
1184 T}:T{
1185 > 0
1186 T}
1187 T{
1188 "generated"
1189 T}:T{
1190 The unit file was generated dynamically via a generator tool\&. See \fBsystemd.generator\fR(7)\&. Generated unit files may not be enabled, they are enabled implicitly by their generator\&.
1191 T}:T{
1192 0
1193 T}
1194 T{
1195 "transient"
1196 T}:T{
1197 The unit file has been created dynamically with the runtime API\&. Transient units may not be enabled\&.
1198 T}:T{
1199 0
1200 T}
1201 T{
1202 "bad"
1203 T}:T{
1204 The unit file is invalid or another error occurred\&. Note that \fBis\-enabled\fR will not actually return this state, but print an error message instead\&. However, the unit file listing printed by \fBlist\-unit\-files\fR might show it\&.
1205 T}:T{
1206 > 0
1207 T}
1208 T{
1209 "not\-found"
1210 T}:T{
1211 The unit file does not exist\&.
1212 T}:T{
1213 4
1214 T}
1215 .TE
1216 .sp 1
1217 Added in version 238\&.
1218 .RE
1219 .PP
1220 \fBmask \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1221 .RS 4
1222 Mask one or more units, as specified on the command line\&. This will link these unit files to
1223 /dev/null, making it impossible to start them\&. This is a stronger version of
1224 \fBdisable\fR, since it prohibits all kinds of activation of the unit, including enablement and manual activation\&. Use this option with care\&. This honors the
1225 \fB\-\-runtime\fR
1226 option to only mask temporarily until the next reboot of the system\&. The
1227 \fB\-\-now\fR
1228 option may be used to ensure that the units are also stopped\&. This command expects valid unit names only, it does not accept unit file paths\&.
1229 .sp
1230 Note that this will create a symlink under the unit\*(Aqs name in
1231 /etc/systemd/system/
1232 (in case
1233 \fB\-\-runtime\fR
1234 is not specified) or
1235 /run/systemd/system/
1236 (in case
1237 \fB\-\-runtime\fR
1238 is specified)\&. If a matching unit file already exists under these directories this operation will hence fail\&. This means that the operation is primarily useful to mask units shipped by the vendor (as those are shipped in
1239 /usr/lib/systemd/system/
1240 and not the aforementioned two directories), but typically does not work for units created locally (as those are typically placed precisely in the two aforementioned directories)\&. Similar restrictions apply for
1241 \fB\-\-user\fR
1242 mode, in which case the directories are below the user\*(Aqs home directory however\&.
1243 .sp
1244 If a unit gets masked but its triggering units are still active, a warning containing the names of the triggering units is shown\&.
1245 \fB\-\-no\-warn\fR
1246 can be used to suppress the warning\&.
1247 .sp
1248 Added in version 238\&.
1249 .RE
1250 .PP
1251 \fBunmask \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1252 .RS 4
1253 Unmask one or more unit files, as specified on the command line\&. This will undo the effect of
1254 \fBmask\fR\&. This command expects valid unit names only, it does not accept unit file paths\&.
1255 .sp
1256 Added in version 238\&.
1257 .RE
1258 .PP
1259 \fBlink \fR\fB\fIPATH\fR\fR\fB\&...\fR
1260 .RS 4
1261 Link a unit file that is not in the unit file search path into the unit file search path\&. This command expects an absolute path to a unit file\&. The effect of this may be undone with
1262 \fBdisable\fR\&. The effect of this command is that a unit file is made available for commands such as
1263 \fBstart\fR, even though it is not installed directly in the unit search path\&. The file system where the linked unit files are located must be accessible when systemd is started (e\&.g\&. anything underneath
1264 /home/
1265 or
1266 /var/
1267 is not allowed, unless those directories are located on the root file system)\&.
1268 .sp
1269 Added in version 233\&.
1270 .RE
1271 .PP
1272 \fBrevert \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1273 .RS 4
1274 Revert one or more unit files to their vendor versions\&. This command removes drop\-in configuration files that modify the specified units, as well as any user\-configured unit file that overrides a matching vendor supplied unit file\&. Specifically, for a unit
1275 "foo\&.service"
1276 the matching directories
1277 "foo\&.service\&.d/"
1278 with all their contained files are removed, both below the persistent and runtime configuration directories (i\&.e\&. below
1279 /etc/systemd/system
1280 and
1281 /run/systemd/system); if the unit file has a vendor\-supplied version (i\&.e\&. a unit file located below
1282 /usr/) any matching persistent or runtime unit file that overrides it is removed, too\&. Note that if a unit file has no vendor\-supplied version (i\&.e\&. is only defined below
1283 /etc/systemd/system
1284 or
1285 /run/systemd/system, but not in a unit file stored below
1286 /usr/), then it is not removed\&. Also, if a unit is masked, it is unmasked\&.
1287 .sp
1288 Effectively, this command may be used to undo all changes made with
1289 \fBsystemctl edit\fR,
1290 \fBsystemctl set\-property\fR
1291 and
1292 \fBsystemctl mask\fR
1293 and puts the original unit file with its settings back in effect\&.
1294 .sp
1295 Added in version 230\&.
1296 .RE
1297 .PP
1298 \fBadd\-wants \fR\fB\fITARGET\fR\fR\fB \fR\fB\fIUNIT\fR\fR\fB\&...\fR, \fBadd\-requires \fR\fB\fITARGET\fR\fR\fB \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1299 .RS 4
1300 Adds
1301 "Wants="
1302 or
1303 "Requires="
1304 dependencies, respectively, to the specified
1305 \fITARGET\fR
1306 for one or more units\&.
1307 .sp
1308 This command honors
1309 \fB\-\-system\fR,
1310 \fB\-\-user\fR,
1311 \fB\-\-runtime\fR
1312 and
1313 \fB\-\-global\fR
1314 in a way similar to
1315 \fBenable\fR\&.
1316 .sp
1317 Added in version 217\&.
1318 .RE
1319 .PP
1320 \fBedit \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1321 .RS 4
1322 Edit or replace a drop\-in snippet or the main unit file, to extend or override the definition of the specified unit\&.
1323 .sp
1324 Depending on whether
1325 \fB\-\-system\fR
1326 (the default),
1327 \fB\-\-user\fR, or
1328 \fB\-\-global\fR
1329 is specified, this command will operate on the system unit files, unit files for the calling user, or the unit files shared between all users\&.
1330 .sp
1331 The editor (see the "Environment" section below) is invoked on temporary files which will be written to the real location if the editor exits successfully\&. After the editing is finished, configuration is reloaded, equivalent to
1332 \fBsystemctl daemon\-reload \-\-system\fR
1333 or
1334 \fBsystemctl daemon\-reload \-\-user\fR\&. For
1335 \fBedit \-\-global\fR, the reload is not performed and the edits will take effect only for subsequent logins (or after a reload is requested in a different way)\&.
1336 .sp
1337 If
1338 \fB\-\-full\fR
1339 is specified, a replacement for the main unit file will be created or edited\&. Otherwise, a drop\-in file will be created or edited\&.
1340 .sp
1341 If
1342 \fB\-\-drop\-in=\fR
1343 is specified, the given drop\-in file name will be used instead of the default
1344 override\&.conf\&.
1345 .sp
1346 The unit must exist, i\&.e\&. its main unit file must be present\&. If
1347 \fB\-\-force\fR
1348 is specified, this requirement is ignored and a new unit may be created (with
1349 \fB\-\-full\fR), or a drop\-in for a nonexistent unit may be created\&.
1350 .sp
1351 If
1352 \fB\-\-runtime\fR
1353 is specified, the changes will be made temporarily in
1354 /run/
1355 and they will be lost on the next reboot\&.
1356 .sp
1357 If
1358 \fB\-\-stdin\fR
1359 is specified, the new contents will be read from standard input\&. In this mode, the old contents of the file are discarded\&.
1360 .sp
1361 If the temporary file is empty upon exit, the modification of the related unit is canceled\&.
1362 .sp
1363 Note that this command cannot be used to remotely edit units and that you cannot temporarily edit units which are in
1364 /etc/, since they take precedence over
1365 /run/\&.
1366 .sp
1367 Added in version 218\&.
1368 .RE
1369 .PP
1370 \fBget\-default\fR
1371 .RS 4
1372 Return the default target to boot into\&. This returns the target unit name
1373 default\&.target
1374 is aliased (symlinked) to\&.
1375 .sp
1376 Added in version 205\&.
1377 .RE
1378 .PP
1379 \fBset\-default \fR\fB\fITARGET\fR\fR
1380 .RS 4
1381 Set the default target to boot into\&. This sets (symlinks) the
1382 default\&.target
1383 alias to the given target unit\&.
1384 .sp
1385 Added in version 205\&.
1386 .RE
1387 .SS "Machine Commands"
1388 .PP
1389 \fBlist\-machines\fR [\fIPATTERN\fR\&...]
1390 .RS 4
1391 List the host and all running local containers with their state\&. If one or more
1392 \fIPATTERN\fRs are specified, only containers matching one of them are shown\&.
1393 .sp
1394 Added in version 212\&.
1395 .RE
1396 .SS "Job Commands"
1397 .PP
1398 \fBlist\-jobs \fR\fB[\fIPATTERN\&...\fR]\fR
1399 .RS 4
1400 List jobs that are in progress\&. If one or more
1401 \fIPATTERN\fRs are specified, only jobs for units matching one of them are shown\&.
1402 .sp
1403 When combined with
1404 \fB\-\-after\fR
1405 or
1406 \fB\-\-before\fR
1407 the list is augmented with information on which other job each job is waiting for, and which other jobs are waiting for it, see above\&.
1408 .sp
1409 Added in version 233\&.
1410 .RE
1411 .PP
1412 \fBcancel \fR\fB[\fIJOB\fR\&...]\fR
1413 .RS 4
1414 Cancel one or more jobs specified on the command line by their numeric job IDs\&. If no job ID is specified, cancel all pending jobs\&.
1415 .sp
1416 Added in version 233\&.
1417 .RE
1418 .SS "Environment Commands"
1419 .PP
1420 \fBsystemd\fR
1421 supports an environment block that is passed to processes the manager spawns\&. The names of the variables can contain ASCII letters, digits, and the underscore character\&. Variable names cannot be empty or start with a digit\&. In variable values, most characters are allowed, but the whole sequence must be valid UTF\-8\&. (Note that control characters like newline (\fBNL\fR), tab (\fBTAB\fR), or the escape character (\fBESC\fR),
1422 \fIare\fR
1423 valid ASCII and thus valid UTF\-8)\&. The total length of the environment block is limited to
1424 \fB_SC_ARG_MAX\fR
1425 value defined by
1426 \fBsysconf\fR(3)\&.
1427 .PP
1428 \fBshow\-environment\fR
1429 .RS 4
1430 Dump the systemd manager environment block\&. This is the environment block that is passed to all processes the manager spawns\&. The environment block will be dumped in straightforward form suitable for sourcing into most shells\&. If no special characters or whitespace is present in the variable values, no escaping is performed, and the assignments have the form
1431 "VARIABLE=value"\&. If whitespace or characters which have special meaning to the shell are present, dollar\-single\-quote escaping is used, and assignments have the form
1432 "VARIABLE=$\*(Aqvalue\*(Aq"\&. This syntax is known to be supported by
1433 \fBbash\fR(1),
1434 \fBzsh\fR(1),
1435 \fBksh\fR(1), and
1436 \fBbusybox\fR(1)\*(Aqs
1437 \fBash\fR(1), but not
1438 \fBdash\fR(1)
1439 or
1440 \fBfish\fR(1)\&.
1441 .sp
1442 Note that this shows the
1443 \fIeffective\fR
1444 block, i\&.e\&. the combination of environment variables configured via configuration files, environment generators and via IPC (i\&.e\&. via the
1445 \fBset\-environment\fR
1446 described below)\&. At the moment a unit process is forked off, this combined environment block will be further combined with per\-unit environment variables, which are not visible in this command\&.
1447 .RE
1448 .PP
1449 \fBset\-environment \fR\fB\fIVARIABLE=VALUE\fR\fR\fB\&...\fR
1450 .RS 4
1451 Set one or more service manager environment variables, as specified on the command line\&. This command will fail if variable names and values do not conform to the rules listed above\&.
1452 .sp
1453 Note that this operates on an environment block separate from the environment block configured from service manager configuration and environment generators\&. Whenever a process is invoked the two blocks are combined (also incorporating any per\-service environment variables), and passed to it\&. The
1454 \fBshow\-environment\fR
1455 verb will show the combination of the blocks, see above\&.
1456 .sp
1457 Added in version 233\&.
1458 .RE
1459 .PP
1460 \fBunset\-environment \fR\fB\fIVARIABLE\fR\fR\fB\&...\fR
1461 .RS 4
1462 Unset one or more systemd manager environment variables\&. If only a variable name is specified, it will be removed regardless of its value\&. If a variable and a value are specified, the variable is only removed if it has the specified value\&.
1463 .sp
1464 Note that this operates on an environment block separate from the environment block configured from service manager configuration and environment generators\&. Whenever a process is invoked the two blocks are combined (also incorporating any per\-service environment variables), and passed to it\&. The
1465 \fBshow\-environment\fR
1466 verb will show the combination of the blocks, see above\&. Note that this means this command cannot be used to unset environment variables defined in the service manager configuration files or via generators\&.
1467 .sp
1468 Added in version 233\&.
1469 .RE
1470 .PP
1471 \fBimport\-environment\fR \fIVARIABLE\&...\fR
1472 .RS 4
1473 Import all, one or more environment variables set on the client into the systemd manager environment block\&. If a list of environment variable names is passed, client\-side values are then imported into the manager\*(Aqs environment block\&. If any names are not valid environment variable names or have invalid values according to the rules described above, an error is raised\&. If no arguments are passed, the entire environment block inherited by the
1474 \fBsystemctl\fR
1475 process is imported\&. In this mode, any inherited invalid environment variables are quietly ignored\&.
1476 .sp
1477 Importing of the full inherited environment block (calling this command without any arguments) is deprecated\&. A shell will set dozens of variables which only make sense locally and are only meant for processes which are descendants of the shell\&. Such variables in the global environment block are confusing to other processes\&.
1478 .sp
1479 Added in version 209\&.
1480 .RE
1481 .SS "Manager State Commands"
1482 .PP
1483 \fBdaemon\-reload\fR
1484 .RS 4
1485 Reload the systemd manager configuration\&. This will rerun all generators (see
1486 \fBsystemd.generator\fR(7)), reload all unit files, and recreate the entire dependency tree\&. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay accessible\&.
1487 .sp
1488 This command should not be confused with the
1489 \fBreload\fR
1490 command\&.
1491 .RE
1492 .PP
1493 \fBdaemon\-reexec\fR
1494 .RS 4
1495 Reexecute the systemd manager\&. This will serialize the manager state, reexecute the process and deserialize the state again\&. This command is of little use except for debugging and package upgrades\&. Sometimes, it might be helpful as a heavy\-weight
1496 \fBdaemon\-reload\fR\&. While the daemon is being reexecuted, all sockets systemd listening on behalf of user configuration will stay accessible\&.
1497 .RE
1498 .PP
1499 \fBlog\-level\fR [\fILEVEL\fR]
1500 .RS 4
1501 If no argument is given, print the current log level of the manager\&. If an optional argument
1502 \fILEVEL\fR
1503 is provided, then the command changes the current log level of the manager to
1504 \fILEVEL\fR
1505 (accepts the same values as
1506 \fB\-\-log\-level=\fR
1507 described in
1508 \fBsystemd\fR(1))\&.
1509 .sp
1510 Added in version 244\&.
1511 .RE
1512 .PP
1513 \fBlog\-target\fR [\fITARGET\fR]
1514 .RS 4
1515 If no argument is given, print the current log target of the manager\&. If an optional argument
1516 \fITARGET\fR
1517 is provided, then the command changes the current log target of the manager to
1518 \fITARGET\fR
1519 (accepts the same values as
1520 \fB\-\-log\-target=\fR, described in
1521 \fBsystemd\fR(1))\&.
1522 .sp
1523 Added in version 244\&.
1524 .RE
1525 .PP
1526 \fBservice\-watchdogs\fR [yes|no]
1527 .RS 4
1528 If no argument is given, print the current state of service runtime watchdogs of the manager\&. If an optional boolean argument is provided, then globally enables or disables the service runtime watchdogs (\fBWatchdogSec=\fR) and emergency actions (e\&.g\&.
1529 \fBOnFailure=\fR
1530 or
1531 \fBStartLimitAction=\fR); see
1532 \fBsystemd.service\fR(5)\&. The hardware watchdog is not affected by this setting\&.
1533 .sp
1534 Added in version 244\&.
1535 .RE
1536 .SS "System Commands"
1537 .PP
1538 \fBis\-system\-running\fR
1539 .RS 4
1540 Checks whether the system is operational\&. This returns success (exit code 0) when the system is fully up and running, specifically not in startup, shutdown or maintenance mode, and with no failed services\&. Failure is returned otherwise (exit code non\-zero)\&. In addition, the current state is printed in a short string to standard output, see the table below\&. Use
1541 \fB\-\-quiet\fR
1542 to suppress this output\&.
1543 .sp
1544 Use
1545 \fB\-\-wait\fR
1546 to wait until the boot process is completed before printing the current state and returning the appropriate error status\&. If
1547 \fB\-\-wait\fR
1548 is in use, states
1549 \fIinitializing\fR
1550 or
1551 \fIstarting\fR
1552 will not be reported, instead the command will block until a later state (such as
1553 \fIrunning\fR
1554 or
1555 \fIdegraded\fR) is reached\&.
1556 .sp
1557 .it 1 an-trap
1558 .nr an-no-space-flag 1
1559 .nr an-break-flag 1
1560 .br
1561 .B Table\ \&4.\ \&is\-system\-running output
1562 .TS
1563 allbox tab(:);
1564 lB lB lB.
1565 T{
1566 Name
1567 T}:T{
1568 Description
1569 T}:T{
1570 Exit Code
1571 T}
1572 .T&
1573 l l l
1574 l l l
1575 l l l
1576 l l l
1577 l l l
1578 l l l
1579 l l l
1580 l l l.
1581 T{
1582 \fIinitializing\fR
1583 T}:T{
1584 Early bootup, before
1585 basic\&.target
1586 is reached or the
1587 \fImaintenance\fR
1588 state entered\&.
1589 T}:T{
1590 > 0
1591 T}
1592 T{
1593 \fIstarting\fR
1594 T}:T{
1595 Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached\&.
1596 T}:T{
1597 > 0
1598 T}
1599 T{
1600 \fIrunning\fR
1601 T}:T{
1602 The system is fully operational\&.
1603 T}:T{
1604 0
1605 T}
1606 T{
1607 \fIdegraded\fR
1608 T}:T{
1609 The system is operational but one or more units failed\&.
1610 T}:T{
1611 > 0
1612 T}
1613 T{
1614 \fImaintenance\fR
1615 T}:T{
1616 The rescue or emergency target is active\&.
1617 T}:T{
1618 > 0
1619 T}
1620 T{
1621 \fIstopping\fR
1622 T}:T{
1623 The manager is shutting down\&.
1624 T}:T{
1625 > 0
1626 T}
1627 T{
1628 \fIoffline\fR
1629 T}:T{
1630 The manager is not running\&. Specifically, this is the operational state if an incompatible program is running as system manager (PID 1)\&.
1631 T}:T{
1632 > 0
1633 T}
1634 T{
1635 \fIunknown\fR
1636 T}:T{
1637 The operational state could not be determined, due to lack of resources or another error cause\&.
1638 T}:T{
1639 > 0
1640 T}
1641 .TE
1642 .sp 1
1643 Added in version 215\&.
1644 .RE
1645 .PP
1646 \fBdefault\fR
1647 .RS 4
1648 Enter default mode\&. This is equivalent to
1649 \fBsystemctl isolate default\&.target\fR\&. This operation is blocking by default, use
1650 \fB\-\-no\-block\fR
1651 to request asynchronous behavior\&.
1652 .RE
1653 .PP
1654 \fBrescue\fR
1655 .RS 4
1656 Enter rescue mode\&. This is equivalent to
1657 \fBsystemctl isolate rescue\&.target\fR\&. This operation is blocking by default, use
1658 \fB\-\-no\-block\fR
1659 to request asynchronous behavior\&.
1660 .RE
1661 .PP
1662 \fBemergency\fR
1663 .RS 4
1664 Enter emergency mode\&. This is equivalent to
1665 \fBsystemctl isolate emergency\&.target\fR\&. This operation is blocking by default, use
1666 \fB\-\-no\-block\fR
1667 to request asynchronous behavior\&.
1668 .RE
1669 .PP
1670 \fBhalt\fR
1671 .RS 4
1672 Shut down and halt the system\&. This is mostly equivalent to
1673 \fBsystemctl start halt\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR, but also prints a wall message to all users\&. This command is asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete\&. Note that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered on\&. Use
1674 \fBsystemctl poweroff\fR
1675 for powering off the system (see below)\&.
1676 .sp
1677 If combined with
1678 \fB\-\-force\fR, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read\-only, immediately followed by the system halt\&. If
1679 \fB\-\-force\fR
1680 is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems\&. This may result in data loss\&. Note that when
1681 \fB\-\-force\fR
1682 is specified twice the halt operation is executed by
1683 \fBsystemctl\fR
1684 itself, and the system manager is not contacted\&. This means the command should succeed even when the system manager has crashed\&.
1685 .sp
1686 If combined with
1687 \fB\-\-when=\fR, shutdown will be scheduled after the given timestamp\&. And
1688 \fB\-\-when=cancel\fR
1689 will cancel the shutdown\&.
1690 .RE
1691 .PP
1692 \fBpoweroff\fR
1693 .RS 4
1694 Shut down and power\-off the system\&. This is mostly equivalent to
1695 \fBsystemctl start poweroff\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR, but also prints a wall message to all users\&. This command is asynchronous; it will return after the power\-off operation is enqueued, without waiting for it to complete\&.
1696 .sp
1697 This command honors
1698 \fB\-\-force\fR
1699 and
1700 \fB\-\-when=\fR
1701 in a similar way as
1702 \fBhalt\fR\&.
1703 .RE
1704 .PP
1705 \fBreboot\fR
1706 .RS 4
1707 Shut down and reboot the system\&.
1708 .sp
1709 This command is mostly equivalent to
1710 \fBsystemctl start reboot\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR, but also prints a wall message to all users\&. This command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete\&.
1711 .sp
1712 If the switch
1713 \fB\-\-reboot\-argument=\fR
1714 is given, it will be passed as the optional argument to the
1715 \fBreboot\fR(2)
1716 system call\&.
1717 .sp
1718 Options
1719 \fB\-\-boot\-loader\-entry=\fR,
1720 \fB\-\-boot\-loader\-menu=\fR, and
1721 \fB\-\-firmware\-setup\fR
1722 can be used to select what to do
1723 \fIafter\fR
1724 the reboot\&. See the descriptions of those options for details\&.
1725 .sp
1726 This command honors
1727 \fB\-\-force\fR
1728 and
1729 \fB\-\-when=\fR
1730 in a similar way as
1731 \fBhalt\fR\&.
1732 .sp
1733 If a new kernel has been loaded via
1734 \fBkexec \-\-load\fR, a
1735 \fBkexec\fR
1736 will be performed instead of a reboot, unless
1737 "SYSTEMCTL_SKIP_AUTO_KEXEC=1"
1738 has been set\&. If a new root file system has been set up on
1739 "/run/nextroot/", a
1740 \fBsoft\-reboot\fR
1741 will be performed instead of a reboot, unless
1742 "SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1"
1743 has been set\&.
1744 .sp
1745 Added in version 246\&.
1746 .RE
1747 .PP
1748 \fBkexec\fR
1749 .RS 4
1750 Shut down and reboot the system via
1751 \fBkexec\fR\&. This command will load a kexec kernel if one was not loaded yet or fail\&. A kernel may be loaded earlier by a separate step, this is particularly useful if a custom initrd or additional kernel command line options are desired\&. The
1752 \fB\-\-force\fR
1753 can be used to continue without a kexec kernel, i\&.e\&. to perform a normal reboot\&. The final reboot step is equivalent to
1754 \fBsystemctl start kexec\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR\&.
1755 .sp
1756 To load a kernel, an enumeration is performed following the
1757 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, and the default boot entry is loaded\&. For this step to succeed, the system must be using UEFI and the boot loader entries must be configured appropriately\&.
1758 \fBbootctl list\fR
1759 may be used to list boot entries, see
1760 \fBbootctl\fR(1)\&.
1761 .sp
1762 This command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete\&.
1763 .sp
1764 This command honors
1765 \fB\-\-force\fR
1766 and
1767 \fB\-\-when=\fR
1768 similarly to
1769 \fBhalt\fR\&.
1770 .sp
1771 If a new kernel has been loaded via
1772 \fBkexec \-\-load\fR, a
1773 \fBkexec\fR
1774 will be performed when
1775 \fBreboot\fR
1776 is invoked, unless
1777 "SYSTEMCTL_SKIP_AUTO_KEXEC=1"
1778 has been set\&.
1779 .RE
1780 .PP
1781 \fBsoft\-reboot\fR
1782 .RS 4
1783 Shut down and reboot userspace\&. This is equivalent to
1784 \fBsystemctl start soft\-reboot\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR\&. This command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete\&.
1785 .sp
1786 This command honors
1787 \fB\-\-force\fR
1788 and
1789 \fB\-\-when=\fR
1790 in a similar way as
1791 \fBhalt\fR\&.
1792 .sp
1793 This operation only reboots userspace, leaving the kernel running\&. See
1794 \fBsystemd-soft-reboot.service\fR(8)
1795 for details\&.
1796 .sp
1797 If a new root file system has been set up on
1798 "/run/nextroot/", a
1799 \fBsoft\-reboot\fR
1800 will be performed when
1801 \fBreboot\fR
1802 is invoked, unless
1803 "SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1"
1804 has been set\&.
1805 .sp
1806 Added in version 254\&.
1807 .RE
1808 .PP
1809 \fBexit\fR [\fIEXIT_CODE\fR]
1810 .RS 4
1811 Ask the service manager to quit\&. This is only supported for user service managers (i\&.e\&. in conjunction with the
1812 \fB\-\-user\fR
1813 option) or in containers and is equivalent to
1814 \fBpoweroff\fR
1815 otherwise\&. This command is asynchronous; it will return after the exit operation is enqueued, without waiting for it to complete\&.
1816 .sp
1817 The service manager will exit with the specified exit code, if
1818 \fIEXIT_CODE\fR
1819 is passed\&.
1820 .sp
1821 Added in version 227\&.
1822 .RE
1823 .PP
1824 \fBswitch\-root\fR [\fIROOT\fR [\fIINIT\fR]]
1825 .RS 4
1826 Switches to a different root directory and executes a new system manager process below it\&. This is intended for use in the initrd, and will transition from the initrd\*(Aqs system manager process (a\&.k\&.a\&. "init" process, PID 1) to the main system manager process which is loaded from the actual host root files system\&. This call takes two arguments: the directory that is to become the new root directory, and the path to the new system manager binary below it to execute as PID 1\&. If both are omitted or the former is an empty string it defaults to
1827 /sysroot/\&. If the latter is omitted or is an empty string, a systemd binary will automatically be searched for and used as service manager\&. If the system manager path is omitted, equal to the empty string or identical to the path to the systemd binary, the state of the initrd\*(Aqs system manager process is passed to the main system manager, which allows later introspection of the state of the services involved in the initrd boot phase\&.
1828 .sp
1829 Added in version 209\&.
1830 .RE
1831 .PP
1832 \fBsleep\fR
1833 .RS 4
1834 Put the system to sleep, through
1835 \fBsuspend\fR,
1836 \fBhibernate\fR,
1837 \fBhybrid\-sleep\fR, or
1838 \fBsuspend\-then\-hibernate\fR\&. The sleep operation to use is automatically selected by
1839 \fBsystemd-logind.service\fR(8)\&. By default,
1840 \fBsuspend\-then\-hibernate\fR
1841 is used, and falls back to
1842 \fBsuspend\fR
1843 and then
1844 \fBhibernate\fR
1845 if not supported\&. Refer to
1846 \fISleepOperation=\fR
1847 setting in
1848 \fBlogind.conf\fR(5)
1849 for more details\&. This command is asynchronous, and will return after the sleep operation is successfully enqueued\&. It will not wait for the sleep/resume cycle to complete\&.
1850 .sp
1851 Added in version 256\&.
1852 .RE
1853 .PP
1854 \fBsuspend\fR
1855 .RS 4
1856 Suspend the system\&. This will trigger activation of the special target unit
1857 suspend\&.target\&. This command is asynchronous, and will return after the suspend operation is successfully enqueued\&. It will not wait for the suspend/resume cycle to complete\&.
1858 .sp
1859 If
1860 \fB\-\-force\fR
1861 is specified, and
1862 \fBsystemd\-logind\fR
1863 returned error for the operation, the error will be ignored and the operation will be tried again directly through starting the target unit\&.
1864 .RE
1865 .PP
1866 \fBhibernate\fR
1867 .RS 4
1868 Hibernate the system\&. This will trigger activation of the special target unit
1869 hibernate\&.target\&. This command is asynchronous, and will return after the hibernation operation is successfully enqueued\&. It will not wait for the hibernate/thaw cycle to complete\&.
1870 .sp
1871 This command honors
1872 \fB\-\-force\fR
1873 in the same way as
1874 \fBsuspend\fR\&.
1875 .RE
1876 .PP
1877 \fBhybrid\-sleep\fR
1878 .RS 4
1879 Hibernate and suspend the system\&. This will trigger activation of the special target unit
1880 hybrid\-sleep\&.target\&. This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued\&. It will not wait for the sleep/wake\-up cycle to complete\&.
1881 .sp
1882 This command honors
1883 \fB\-\-force\fR
1884 in the same way as
1885 \fBsuspend\fR\&.
1886 .sp
1887 Added in version 196\&.
1888 .RE
1889 .PP
1890 \fBsuspend\-then\-hibernate\fR
1891 .RS 4
1892 Suspend the system and hibernate it when the battery is low, or when the delay specified in
1893 systemd\-sleep\&.conf
1894 elapsed\&. This will trigger activation of the special target unit
1895 suspend\-then\-hibernate\&.target\&. This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued\&. It will not wait for the sleep/wake\-up or hibernate/thaw cycle to complete\&.
1896 .sp
1897 This command honors
1898 \fB\-\-force\fR
1899 in the same way as
1900 \fBsuspend\fR\&.
1901 .sp
1902 Added in version 240\&.
1903 .RE
1904 .SS "Parameter Syntax"
1905 .PP
1906 Unit commands listed above take either a single unit name (designated as
1907 \fIUNIT\fR), or multiple unit specifications (designated as
1908 \fIPATTERN\fR\&...)\&. In the first case, the unit name with or without a suffix must be given\&. If the suffix is not specified (unit name is "abbreviated"), systemctl will append a suitable suffix,
1909 "\&.service"
1910 by default, and a type\-specific suffix in case of commands which operate only on specific unit types\&. For example,
1911 .sp
1912 .if n \{\
1913 .RS 4
1914 .\}
1915 .nf
1916 # systemctl start sshd
1917 .fi
1918 .if n \{\
1919 .RE
1920 .\}
1921 .sp
1922 and
1923 .sp
1924 .if n \{\
1925 .RS 4
1926 .\}
1927 .nf
1928 # systemctl start sshd\&.service
1929 .fi
1930 .if n \{\
1931 .RE
1932 .\}
1933 .sp
1934 are equivalent, as are
1935 .sp
1936 .if n \{\
1937 .RS 4
1938 .\}
1939 .nf
1940 # systemctl isolate default
1941 .fi
1942 .if n \{\
1943 .RE
1944 .\}
1945 .sp
1946 and
1947 .sp
1948 .if n \{\
1949 .RS 4
1950 .\}
1951 .nf
1952 # systemctl isolate default\&.target
1953 .fi
1954 .if n \{\
1955 .RE
1956 .\}
1957 .sp
1958 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute) paths to mount unit names\&.
1959 .sp
1960 .if n \{\
1961 .RS 4
1962 .\}
1963 .nf
1964 # systemctl status /dev/sda
1965 # systemctl status /home
1966 .fi
1967 .if n \{\
1968 .RE
1969 .\}
1970 .sp
1971 are equivalent to:
1972 .sp
1973 .if n \{\
1974 .RS 4
1975 .\}
1976 .nf
1977 # systemctl status dev\-sda\&.device
1978 # systemctl status home\&.mount
1979 .fi
1980 .if n \{\
1981 .RE
1982 .\}
1983 .sp
1984 In the second case, shell\-style globs will be matched against the primary names of all units currently in memory; literal unit names, with or without a suffix, will be treated as in the first case\&. This means that literal unit names always refer to exactly one unit, but globs may match zero units and this is not considered an error\&.
1985 .PP
1986 Glob patterns use
1987 \fBfnmatch\fR(3), so normal shell\-style globbing rules are used, and
1988 "*",
1989 "?",
1990 "[]"
1991 may be used\&. See
1992 \fBglob\fR(7)
1993 for more details\&. The patterns are matched against the primary names of units currently in memory, and patterns which do not match anything are silently skipped\&. For example:
1994 .sp
1995 .if n \{\
1996 .RS 4
1997 .\}
1998 .nf
1999 # systemctl stop "sshd@*\&.service"
2000 .fi
2001 .if n \{\
2002 .RE
2003 .\}
2004 .sp
2005 will stop all
2006 sshd@\&.service
2007 instances\&. Note that alias names of units, and units that are not in memory are not considered for glob expansion\&.
2008 .PP
2009 For unit file commands, the specified
2010 \fIUNIT\fR
2011 should be the name of the unit file (possibly abbreviated, see above), or the absolute path to the unit file:
2012 .sp
2013 .if n \{\
2014 .RS 4
2015 .\}
2016 .nf
2017 # systemctl enable foo\&.service
2018 .fi
2019 .if n \{\
2020 .RE
2021 .\}
2022 .sp
2023 or
2024 .sp
2025 .if n \{\
2026 .RS 4
2027 .\}
2028 .nf
2029 # systemctl link /path/to/foo\&.service
2030 .fi
2031 .if n \{\
2032 .RE
2033 .\}
2034 .sp
2035 .SH "OPTIONS"
2036 .PP
2037 The following options are understood:
2038 .PP
2039 \fB\-t\fR, \fB\-\-type=\fR
2040 .RS 4
2041 The argument is a comma\-separated list of unit types such as
2042 \fBservice\fR
2043 and
2044 \fBsocket\fR\&. When units are listed with
2045 \fBlist\-units\fR,
2046 \fBlist\-dependencies\fR,
2047 \fBshow\fR, or
2048 \fBstatus\fR, only units of the specified types will be shown\&. By default, units of all types are shown\&.
2049 .sp
2050 As a special case, if one of the arguments is
2051 \fBhelp\fR, a list of allowed values will be printed and the program will exit\&.
2052 .RE
2053 .PP
2054 \fB\-\-state=\fR
2055 .RS 4
2056 The argument is a comma\-separated list of unit LOAD, SUB, or ACTIVE states\&. When listing units with
2057 \fBlist\-units\fR,
2058 \fBlist\-dependencies\fR,
2059 \fBshow\fR
2060 or
2061 \fBstatus\fR, show only those in the specified states\&. Use
2062 \fB\-\-state=failed\fR
2063 or
2064 \fB\-\-failed\fR
2065 to show only failed units\&.
2066 .sp
2067 As a special case, if one of the arguments is
2068 \fBhelp\fR, a list of allowed values will be printed and the program will exit\&.
2069 .sp
2070 Added in version 206\&.
2071 .RE
2072 .PP
2073 \fB\-p\fR, \fB\-\-property=\fR
2074 .RS 4
2075 When showing unit/job/manager properties with the
2076 \fBshow\fR
2077 command, limit display to properties specified in the argument\&. The argument should be a comma\-separated list of property names, such as
2078 "MainPID"\&. Unless specified, all known properties are shown\&. If specified more than once, all properties with the specified names are shown\&. Shell completion is implemented for property names\&.
2079 .sp
2080 For the manager itself,
2081 \fBsystemctl\ \&show\fR
2082 will show all available properties, most of which are derived or closely match the options described in
2083 \fBsystemd-system.conf\fR(5)\&.
2084 .sp
2085 Properties for units vary by unit type, so showing any unit (even a non\-existent one) is a way to list properties pertaining to this type\&. Similarly, showing any job will list properties pertaining to all jobs\&. Properties for units are documented in
2086 \fBsystemd.unit\fR(5), and the pages for individual unit types
2087 \fBsystemd.service\fR(5),
2088 \fBsystemd.socket\fR(5), etc\&.
2089 .RE
2090 .PP
2091 \fB\-P\fR
2092 .RS 4
2093 Equivalent to
2094 \fB\-\-value\fR
2095 \fB\-\-property=\fR, i\&.e\&. shows the value of the property without the property name or
2096 "="\&. Note that using
2097 \fB\-P\fR
2098 once will also affect all properties listed with
2099 \fB\-p\fR/\fB\-\-property=\fR\&.
2100 .sp
2101 Added in version 246\&.
2102 .RE
2103 .PP
2104 \fB\-a\fR, \fB\-\-all\fR
2105 .RS 4
2106 When listing units with
2107 \fBlist\-units\fR, also show inactive units and units which are following other units\&. When showing unit/job/manager properties, show all properties regardless whether they are set or not\&.
2108 .sp
2109 To list all units installed in the file system, use the
2110 \fBlist\-unit\-files\fR
2111 command instead\&.
2112 .sp
2113 When listing units with
2114 \fBlist\-dependencies\fR, recursively show dependencies of all dependent units (by default only dependencies of target units are shown)\&.
2115 .sp
2116 When used with
2117 \fBstatus\fR, show journal messages in full, even if they include unprintable characters or are very long\&. By default, fields with unprintable characters are abbreviated as "blob data"\&. (Note that the pager may escape unprintable characters again\&.)
2118 .RE
2119 .PP
2120 \fB\-r\fR, \fB\-\-recursive\fR
2121 .RS 4
2122 When listing units, also show units of local containers\&. Units of local containers will be prefixed with the container name, separated by a single colon character (":")\&.
2123 .sp
2124 Added in version 212\&.
2125 .RE
2126 .PP
2127 \fB\-\-reverse\fR
2128 .RS 4
2129 Show reverse dependencies between units with
2130 \fBlist\-dependencies\fR, i\&.e\&. follow dependencies of type
2131 \fIWantedBy=\fR,
2132 \fIRequiredBy=\fR,
2133 \fIUpheldBy=\fR,
2134 \fIPartOf=\fR,
2135 \fIBoundBy=\fR, instead of
2136 \fIWants=\fR
2137 and similar\&.
2138 .sp
2139 Added in version 203\&.
2140 .RE
2141 .PP
2142 \fB\-\-after\fR
2143 .RS 4
2144 With
2145 \fBlist\-dependencies\fR, show the units that are ordered before the specified unit\&. In other words, recursively list units following the
2146 \fIAfter=\fR
2147 dependency\&.
2148 .sp
2149 Note that any
2150 \fIAfter=\fR
2151 dependency is automatically mirrored to create a
2152 \fIBefore=\fR
2153 dependency\&. Temporal dependencies may be specified explicitly, but are also created implicitly for units which are
2154 \fIWantedBy=\fR
2155 targets (see
2156 \fBsystemd.target\fR(5)), and as a result of other directives (for example
2157 \fIRequiresMountsFor=\fR)\&. Both explicitly and implicitly introduced dependencies are shown with
2158 \fBlist\-dependencies\fR\&.
2159 .sp
2160 When passed to the
2161 \fBlist\-jobs\fR
2162 command, for each printed job show which other jobs are waiting for it\&. May be combined with
2163 \fB\-\-before\fR
2164 to show both the jobs waiting for each job as well as all jobs each job is waiting for\&.
2165 .sp
2166 Added in version 203\&.
2167 .RE
2168 .PP
2169 \fB\-\-before\fR
2170 .RS 4
2171 With
2172 \fBlist\-dependencies\fR, show the units that are ordered after the specified unit\&. In other words, recursively list units following the
2173 \fIBefore=\fR
2174 dependency\&.
2175 .sp
2176 When passed to the
2177 \fBlist\-jobs\fR
2178 command, for each printed job show which other jobs it is waiting for\&. May be combined with
2179 \fB\-\-after\fR
2180 to show both the jobs waiting for each job as well as all jobs each job is waiting for\&.
2181 .sp
2182 Added in version 212\&.
2183 .RE
2184 .PP
2185 \fB\-\-with\-dependencies\fR
2186 .RS 4
2187 When used with
2188 \fBstatus\fR,
2189 \fBcat\fR,
2190 \fBlist\-units\fR, and
2191 \fBlist\-unit\-files\fR, those commands print all specified units and the dependencies of those units\&.
2192 .sp
2193 Options
2194 \fB\-\-reverse\fR,
2195 \fB\-\-after\fR,
2196 \fB\-\-before\fR
2197 may be used to change what types of dependencies are shown\&.
2198 .sp
2199 Added in version 245\&.
2200 .RE
2201 .PP
2202 \fB\-l\fR, \fB\-\-full\fR
2203 .RS 4
2204 Do not ellipsize unit names, process tree entries, journal output, or truncate unit descriptions in the output of
2205 \fBstatus\fR,
2206 \fBlist\-units\fR,
2207 \fBlist\-jobs\fR, and
2208 \fBlist\-timers\fR\&.
2209 .sp
2210 Also, show installation targets in the output of
2211 \fBis\-enabled\fR\&.
2212 .RE
2213 .PP
2214 \fB\-\-value\fR
2215 .RS 4
2216 When printing properties with
2217 \fBshow\fR, only print the value, and skip the property name and
2218 "="\&. Also see option
2219 \fB\-P\fR
2220 above\&.
2221 .sp
2222 Added in version 230\&.
2223 .RE
2224 .PP
2225 \fB\-\-show\-types\fR
2226 .RS 4
2227 When showing sockets, show the type of the socket\&.
2228 .sp
2229 Added in version 202\&.
2230 .RE
2231 .PP
2232 \fB\-\-job\-mode=\fR
2233 .RS 4
2234 When queuing a new job, this option controls how to deal with already queued jobs\&. It takes one of
2235 "fail",
2236 "replace",
2237 "replace\-irreversibly",
2238 "isolate",
2239 "ignore\-dependencies",
2240 "ignore\-requirements",
2241 "flush",
2242 "triggering", or
2243 "restart\-dependencies"\&. Defaults to
2244 "replace", except when the
2245 \fBisolate\fR
2246 command is used which implies the
2247 "isolate"
2248 job mode\&.
2249 .sp
2250 If
2251 "fail"
2252 is specified and a requested operation conflicts with a pending job (more specifically: causes an already pending start job to be reversed into a stop job or vice versa), cause the operation to fail\&.
2253 .sp
2254 If
2255 "replace"
2256 (the default) is specified, any conflicting pending job will be replaced, as necessary\&.
2257 .sp
2258 If
2259 "replace\-irreversibly"
2260 is specified, operate like
2261 "replace", but also mark the new jobs as irreversible\&. This prevents future conflicting transactions from replacing these jobs (or even being enqueued while the irreversible jobs are still pending)\&. Irreversible jobs can still be cancelled using the
2262 \fBcancel\fR
2263 command\&. This job mode should be used on any transaction which pulls in
2264 shutdown\&.target\&.
2265 .sp
2266 "isolate"
2267 is only valid for start operations and causes all other units to be stopped when the specified unit is started\&. This mode is always used when the
2268 \fBisolate\fR
2269 command is used\&.
2270 .sp
2271 "flush"
2272 will cause all queued jobs to be canceled when the new job is enqueued\&.
2273 .sp
2274 If
2275 "ignore\-dependencies"
2276 is specified, then all unit dependencies are ignored for this new job and the operation is executed immediately\&. If passed, no required units of the unit passed will be pulled in, and no ordering dependencies will be honored\&. This is mostly a debugging and rescue tool for the administrator and should not be used by applications\&.
2277 .sp
2278 "ignore\-requirements"
2279 is similar to
2280 "ignore\-dependencies", but only causes the requirement dependencies to be ignored, the ordering dependencies will still be honored\&.
2281 .sp
2282 "triggering"
2283 may only be used with
2284 \fBsystemctl stop\fR\&. In this mode, the specified unit and any active units that trigger it are stopped\&. See the discussion of
2285 \fITriggers=\fR
2286 in
2287 \fBsystemd.unit\fR(5)
2288 for more information about triggering units\&.
2289 .sp
2290 "restart\-dependencies"
2291 may only be used with
2292 \fBsystemctl start\fR\&. In this mode, dependencies of the specified unit will receive restart propagation, as if a restart job had been enqueued for the unit\&.
2293 .sp
2294 Added in version 209\&.
2295 .RE
2296 .PP
2297 \fB\-T\fR, \fB\-\-show\-transaction\fR
2298 .RS 4
2299 When enqueuing a unit job (for example as effect of a
2300 \fBsystemctl start\fR
2301 invocation or similar), show brief information about all jobs enqueued, covering both the requested job and any added because of unit dependencies\&. Note that the output will only include jobs immediately part of the transaction requested\&. It is possible that service start\-up program code run as effect of the enqueued jobs might request further jobs to be pulled in\&. This means that completion of the listed jobs might ultimately entail more jobs than the listed ones\&.
2302 .sp
2303 Added in version 242\&.
2304 .RE
2305 .PP
2306 \fB\-\-fail\fR
2307 .RS 4
2308 Shorthand for
2309 \fB\-\-job\-mode=\fRfail\&.
2310 .sp
2311 When used with the
2312 \fBkill\fR
2313 command, if no units were killed, the operation results in an error\&.
2314 .sp
2315 Added in version 227\&.
2316 .RE
2317 .PP
2318 \fB\-\-check\-inhibitors=\fR
2319 .RS 4
2320 When system shutdown or sleep state is requested, this option controls checking of inhibitor locks\&. It takes one of
2321 "auto",
2322 "yes", and
2323 "no"\&. Defaults to
2324 "auto", which means logind will perform the check and respect active inhibitor locks, but
2325 \fBsystemctl\fR
2326 will only do a client\-side check for interactive invocations (i\&.e\&. from a TTY), so that a more friendly and informative error can be returned to users\&.
2327 "no"
2328 disables the checks both in
2329 \fBsystemctl\fR
2330 and
2331 \fBsystemd-logind\fR(8)\&.
2332 .sp
2333 Applications can establish inhibitor locks to prevent certain important operations (such as CD burning) from being interrupted by system shutdown or sleep\&. Any user may take these locks and privileged users may override these locks\&. If any locks are taken, shutdown and sleep state requests will normally fail (unless explicitly overridden with
2334 "no")\&.
2335 .sp
2336 Option
2337 \fB\-\-force\fR
2338 provides another way to override inhibitors\&.
2339 .sp
2340 Added in version 248\&.
2341 .RE
2342 .PP
2343 \fB\-i\fR
2344 .RS 4
2345 Shortcut for
2346 \fB\-\-check\-inhibitors=no\fR\&.
2347 .sp
2348 Added in version 198\&.
2349 .RE
2350 .PP
2351 \fB\-\-dry\-run\fR
2352 .RS 4
2353 Just print what would be done\&. Currently supported by verbs
2354 \fBhalt\fR,
2355 \fBpoweroff\fR,
2356 \fBreboot\fR,
2357 \fBkexec\fR,
2358 \fBsuspend\fR,
2359 \fBhibernate\fR,
2360 \fBhybrid\-sleep\fR,
2361 \fBsuspend\-then\-hibernate\fR,
2362 \fBdefault\fR,
2363 \fBrescue\fR,
2364 \fBemergency\fR, and
2365 \fBexit\fR\&.
2366 .sp
2367 Added in version 236\&.
2368 .RE
2369 .PP
2370 \fB\-q\fR, \fB\-\-quiet\fR
2371 .RS 4
2372 Suppress printing of the results of various commands and also the hints about truncated log lines\&. This does not suppress output of commands for which the printed output is the only result (like
2373 \fBshow\fR)\&. Errors are always printed\&.
2374 .RE
2375 .PP
2376 \fB\-\-no\-warn\fR
2377 .RS 4
2378 Do not generate the warnings shown by default in the following cases:
2379 .sp
2380 .RS 4
2381 .ie n \{\
2382 \h'-04'\(bu\h'+03'\c
2383 .\}
2384 .el \{\
2385 .sp -1
2386 .IP \(bu 2.3
2387 .\}
2388 when
2389 \fBsystemctl\fR
2390 is invoked without procfs mounted on
2391 /proc/,
2392 .RE
2393 .sp
2394 .RS 4
2395 .ie n \{\
2396 \h'-04'\(bu\h'+03'\c
2397 .\}
2398 .el \{\
2399 .sp -1
2400 .IP \(bu 2.3
2401 .\}
2402 when using
2403 \fBenable\fR
2404 or
2405 \fBdisable\fR
2406 on units without install information (i\&.e\&. do not have or have an empty [Install] section),
2407 .RE
2408 .sp
2409 .RS 4
2410 .ie n \{\
2411 \h'-04'\(bu\h'+03'\c
2412 .\}
2413 .el \{\
2414 .sp -1
2415 .IP \(bu 2.3
2416 .\}
2417 when using
2418 \fBdisable\fR
2419 combined with
2420 \fB\-\-user\fR
2421 on units that are enabled in global scope,
2422 .RE
2423 .sp
2424 .RS 4
2425 .ie n \{\
2426 \h'-04'\(bu\h'+03'\c
2427 .\}
2428 .el \{\
2429 .sp -1
2430 .IP \(bu 2.3
2431 .\}
2432 when a
2433 \fBstop\fR\-ped,
2434 \fBdisable\fR\-d, or
2435 \fBmask\fR\-ed unit still has active triggering units,
2436 .RE
2437 .sp
2438 .RS 4
2439 .ie n \{\
2440 \h'-04'\(bu\h'+03'\c
2441 .\}
2442 .el \{\
2443 .sp -1
2444 .IP \(bu 2.3
2445 .\}
2446 when a unit file is changed and requires
2447 \fBdaemon\-reload\fR\&.
2448 .RE
2449 .sp
2450 Added in version 253\&.
2451 .RE
2452 .PP
2453 \fB\-\-no\-block\fR
2454 .RS 4
2455 Do not synchronously wait for the requested operation to finish\&. If this is not specified, the job will be verified, enqueued and
2456 \fBsystemctl\fR
2457 will wait until the unit\*(Aqs start\-up is completed\&. By passing this argument, it is only verified and enqueued\&. This option may not be combined with
2458 \fB\-\-wait\fR\&.
2459 .RE
2460 .PP
2461 \fB\-\-wait\fR
2462 .RS 4
2463 When used with
2464 \fBstart\fR
2465 or
2466 \fBrestart\fR, synchronously wait for started units to terminate again\&. This option may not be combined with
2467 \fB\-\-no\-block\fR\&. Note that this will wait forever if any given unit never terminates (by itself or by getting stopped explicitly); particularly services which use
2468 "RemainAfterExit=yes"\&.
2469 .sp
2470 When used with
2471 \fBis\-system\-running\fR, wait until the boot process is completed before returning\&.
2472 .sp
2473 When used with
2474 \fBkill\fR, wait until the signalled units terminate\&. Note that this will wait forever if any given unit never terminates\&.
2475 .sp
2476 Added in version 232\&.
2477 .RE
2478 .PP
2479 \fB\-\-user\fR
2480 .RS 4
2481 Talk to the service manager of the calling user, rather than the service manager of the system\&.
2482 .RE
2483 .PP
2484 \fB\-\-system\fR
2485 .RS 4
2486 Talk to the service manager of the system\&. This is the implied default\&.
2487 .RE
2488 .PP
2489 \fB\-\-failed\fR
2490 .RS 4
2491 List units in failed state\&. This is equivalent to
2492 \fB\-\-state=failed\fR\&.
2493 .sp
2494 Added in version 233\&.
2495 .RE
2496 .PP
2497 \fB\-\-no\-wall\fR
2498 .RS 4
2499 Do not send wall message before halt, power\-off and reboot\&.
2500 .RE
2501 .PP
2502 \fB\-\-global\fR
2503 .RS 4
2504 When used with
2505 \fBenable\fR
2506 and
2507 \fBdisable\fR, operate on the global user configuration directory, thus enabling or disabling a unit file globally for all future logins of all users\&.
2508 .RE
2509 .PP
2510 \fB\-\-no\-reload\fR
2511 .RS 4
2512 When used with
2513 \fBenable\fR,
2514 \fBdisable\fR,
2515 \fBpreset\fR,
2516 \fBmask\fR, or
2517 \fBunmask\fR, do not implicitly reload daemon configuration after executing the changes\&.
2518 .RE
2519 .PP
2520 \fB\-\-kill\-whom=\fR
2521 .RS 4
2522 When used with
2523 \fBkill\fR, choose which processes to send a UNIX process signal to\&. Must be one of
2524 \fBmain\fR,
2525 \fBcontrol\fR
2526 or
2527 \fBall\fR
2528 to select whether to kill only the main process, the control process or all processes of the unit\&. The main process of the unit is the one that defines the life\-time of it\&. A control process of a unit is one that is invoked by the manager to induce state changes of it\&. For example, all processes started due to the
2529 \fIExecStartPre=\fR,
2530 \fIExecStop=\fR
2531 or
2532 \fIExecReload=\fR
2533 settings of service units are control processes\&. Note that there is only one control process per unit at a time, as only one state change is executed at a time\&. For services of type
2534 \fIType=forking\fR, the initial process started by the manager for
2535 \fIExecStart=\fR
2536 is a control process, while the process ultimately forked off by that one is then considered the main process of the unit (if it can be determined)\&. This is different for service units of other types, where the process forked off by the manager for
2537 \fIExecStart=\fR
2538 is always the main process itself\&. A service unit consists of zero or one main process, zero or one control process plus any number of additional processes\&. Not all unit types manage processes of these types however\&. For example, for mount units, control processes are defined (which are the invocations of
2539 /usr/bin/mount
2540 and
2541 /usr/bin/umount), but no main process is defined\&. If omitted, defaults to
2542 \fBall\fR\&.
2543 .sp
2544 Added in version 252\&.
2545 .RE
2546 .PP
2547 \fB\-\-kill\-value=\fR\fB\fIINT\fR\fR
2548 .RS 4
2549 If used with the
2550 \fBkill\fR
2551 command, enqueues a signal along with the specified integer value parameter to the specified process(es)\&. This operation is only available for POSIX Realtime Signals (i\&.e\&.
2552 \fB\-\-signal=SIGRTMIN+\&...\fR
2553 or
2554 \fB\-\-signal=SIGRTMAX\-\&...\fR), and ensures the signals are generated via the
2555 \fBsigqueue\fR(3)
2556 system call, rather than
2557 \fBkill\fR(3)\&. The specified value must be a 32\-bit signed integer, and may be specified either in decimal, in hexadecimal (if prefixed with
2558 "0x"), octal (if prefixed with
2559 "0o") or binary (if prefixed with
2560 "0b")
2561 .sp
2562 If this option is used the signal will only be enqueued on the control or main process of the unit, never on other processes belonging to the unit, i\&.e\&.
2563 \fB\-\-kill\-whom=all\fR
2564 will only affect main and control processes but no other processes\&.
2565 .sp
2566 Added in version 254\&.
2567 .RE
2568 .PP
2569 \fB\-s\fR, \fB\-\-signal=\fR
2570 .RS 4
2571 When used with
2572 \fBkill\fR, choose which signal to send to selected processes\&. Must be one of the well\-known signal specifiers such as
2573 \fBSIGTERM\fR,
2574 \fBSIGINT\fR
2575 or
2576 \fBSIGSTOP\fR\&. If omitted, defaults to
2577 \fBSIGTERM\fR\&.
2578 .sp
2579 The special value
2580 "help"
2581 will list the known values and the program will exit immediately, and the special value
2582 "list"
2583 will list known values along with the numerical signal numbers and the program will exit immediately\&.
2584 .RE
2585 .PP
2586 \fB\-\-what=\fR
2587 .RS 4
2588 Select what type of per\-unit resources to remove when the
2589 \fBclean\fR
2590 command is invoked, see above\&. Takes one of
2591 \fBconfiguration\fR,
2592 \fBstate\fR,
2593 \fBcache\fR,
2594 \fBlogs\fR,
2595 \fBruntime\fR,
2596 \fBfdstore\fR
2597 to select the type of resource\&. This option may be specified more than once, in which case all specified resource types are removed\&. Also accepts the special value
2598 \fBall\fR
2599 as a shortcut for specifying all six resource types\&. If this option is not specified defaults to the combination of
2600 \fBcache\fR,
2601 \fBruntime\fR
2602 and
2603 \fBfdstore\fR, i\&.e\&. the three kinds of resources that are generally considered to be redundant and can be reconstructed on next invocation\&. Note that the explicit removal of the
2604 \fBfdstore\fR
2605 resource type is only useful if the
2606 \fIFileDescriptorStorePreserve=\fR
2607 option is enabled, since the file descriptor store is otherwise cleaned automatically when the unit is stopped\&.
2608 .sp
2609 Added in version 243\&.
2610 .RE
2611 .PP
2612 \fB\-f\fR, \fB\-\-force\fR
2613 .RS 4
2614 When used with
2615 \fBenable\fR, overwrite any existing conflicting symlinks\&.
2616 .sp
2617 When used with
2618 \fBedit\fR, create all of the specified units which do not already exist\&.
2619 .sp
2620 When used with
2621 \fBsuspend\fR,
2622 \fBhibernate\fR,
2623 \fBhybrid\-sleep\fR, or
2624 \fBsuspend\-then\-hibernate\fR, the error returned by
2625 \fBsystemd\-logind\fR
2626 will be ignored, and the operation will be performed directly through starting the corresponding units\&.
2627 .sp
2628 When used with
2629 \fBhalt\fR,
2630 \fBpoweroff\fR,
2631 \fBreboot\fR, or
2632 \fBkexec\fR, execute the selected operation without shutting down all units\&. However, all processes will be killed forcibly and all file systems are unmounted or remounted read\-only\&. This is hence a drastic but relatively safe option to request an immediate reboot\&. If
2633 \fB\-\-force\fR
2634 is specified twice for these operations (with the exception of
2635 \fBkexec\fR), they will be executed immediately, without terminating any processes or unmounting any file systems\&.
2636 .if n \{\
2637 .sp
2638 .\}
2639 .RS 4
2640 .it 1 an-trap
2641 .nr an-no-space-flag 1
2642 .nr an-break-flag 1
2643 .br
2644 .ps +1
2645 \fBWarning\fR
2646 .ps -1
2647 .br
2648 Specifying
2649 \fB\-\-force\fR
2650 twice with any of these operations might result in data loss\&. Note that when
2651 \fB\-\-force\fR
2652 is specified twice the selected operation is executed by
2653 \fBsystemctl\fR
2654 itself, and the system manager is not contacted\&. This means the command should succeed even when the system manager has crashed\&.
2655 .sp .5v
2656 .RE
2657 .RE
2658 .PP
2659 \fB\-\-message=\fR
2660 .RS 4
2661 When used with
2662 \fBhalt\fR,
2663 \fBpoweroff\fR
2664 or
2665 \fBreboot\fR, set a short message explaining the reason for the operation\&. The message will be logged together with the default shutdown message\&.
2666 .sp
2667 Added in version 225\&.
2668 .RE
2669 .PP
2670 \fB\-\-now\fR
2671 .RS 4
2672 When used with
2673 \fBenable\fR,
2674 \fBdisable\fR,
2675 \fBmask\fR, or
2676 \fBreenable\fR, also start/stop/try\-restart the units after the specified unit file operations succeed\&.
2677 .sp
2678 Added in version 220\&.
2679 .RE
2680 .PP
2681 \fB\-\-root=\fR
2682 .RS 4
2683 When used with
2684 \fBenable\fR/\fBdisable\fR/\fBis\-enabled\fR
2685 (and related commands), use the specified root path when looking for unit files\&. If this option is present,
2686 \fBsystemctl\fR
2687 will operate on the file system directly, instead of communicating with the
2688 \fBsystemd\fR
2689 daemon to carry out changes\&.
2690 .RE
2691 .PP
2692 \fB\-\-image=\fR\fB\fIimage\fR\fR
2693 .RS 4
2694 Takes a path to a disk image file or block device node\&. If specified, all operations are applied to file system in the indicated disk image\&. This option is similar to
2695 \fB\-\-root=\fR, but operates on file systems stored in disk images or block devices\&. The disk image should either contain just a file system or a set of file systems within a GPT partition table, following the
2696 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. For further information on supported disk images, see
2697 \fBsystemd-nspawn\fR(1)\*(Aqs switch of the same name\&.
2698 .sp
2699 Added in version 252\&.
2700 .RE
2701 .PP
2702 \fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
2703 .RS 4
2704 Takes an image policy string as argument, as per
2705 \fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
2706 \fB\-\-image=\fR, see above\&. If not specified, defaults to the
2707 "*"
2708 policy, i\&.e\&. all recognized file systems in the image are used\&.
2709 .RE
2710 .PP
2711 \fB\-\-runtime\fR
2712 .RS 4
2713 When used with
2714 \fBenable\fR,
2715 \fBdisable\fR,
2716 \fBedit\fR, (and related commands), make changes only temporarily, so that they are lost on the next reboot\&. This will have the effect that changes are not made in subdirectories of
2717 /etc/
2718 but in
2719 /run/, with identical immediate effects, however, since the latter is lost on reboot, the changes are lost too\&.
2720 .sp
2721 Similarly, when used with
2722 \fBset\-property\fR, make changes only temporarily, so that they are lost on the next reboot\&.
2723 .RE
2724 .PP
2725 \fB\-\-preset\-mode=\fR
2726 .RS 4
2727 Takes one of
2728 "full"
2729 (the default),
2730 "enable\-only",
2731 "disable\-only"\&. When used with the
2732 \fBpreset\fR
2733 or
2734 \fBpreset\-all\fR
2735 commands, controls whether units shall be disabled and enabled according to the preset rules, or only enabled, or only disabled\&.
2736 .sp
2737 Added in version 215\&.
2738 .RE
2739 .PP
2740 \fB\-n\fR, \fB\-\-lines=\fR
2741 .RS 4
2742 When used with
2743 \fBstatus\fR, controls the number of journal lines to show, counting from the most recent ones\&. Takes a positive integer argument, or 0 to disable journal output\&. Defaults to 10\&.
2744 .RE
2745 .PP
2746 \fB\-o\fR, \fB\-\-output=\fR
2747 .RS 4
2748 When used with
2749 \fBstatus\fR, controls the formatting of the journal entries that are shown\&. For the available choices, see
2750 \fBjournalctl\fR(1)\&. Defaults to
2751 "short"\&.
2752 .RE
2753 .PP
2754 \fB\-\-firmware\-setup\fR
2755 .RS 4
2756 When used with the
2757 \fBreboot\fR,
2758 \fBpoweroff\fR, or
2759 \fBhalt\fR
2760 command, indicate to the system\*(Aqs firmware to reboot into the firmware setup interface for the next boot\&. Note that this functionality is not available on all systems\&.
2761 .sp
2762 Added in version 220\&.
2763 .RE
2764 .PP
2765 \fB\-\-boot\-loader\-menu=\fR\fB\fItimeout\fR\fR
2766 .RS 4
2767 When used with the
2768 \fBreboot\fR,
2769 \fBpoweroff\fR, or
2770 \fBhalt\fR
2771 command, indicate to the system\*(Aqs boot loader to show the boot loader menu on the following boot\&. Takes a time value as parameter \(em indicating the menu timeout\&. Pass zero in order to disable the menu timeout\&. Note that not all boot loaders support this functionality\&.
2772 .sp
2773 Added in version 242\&.
2774 .RE
2775 .PP
2776 \fB\-\-boot\-loader\-entry=\fR\fB\fIID\fR\fR
2777 .RS 4
2778 When used with the
2779 \fBreboot\fR,
2780 \fBpoweroff\fR, or
2781 \fBhalt\fR
2782 command, indicate to the system\*(Aqs boot loader to boot into a specific boot loader entry on the following boot\&. Takes a boot loader entry identifier as argument, or
2783 "help"
2784 in order to list available entries\&. Note that not all boot loaders support this functionality\&.
2785 .sp
2786 Added in version 242\&.
2787 .RE
2788 .PP
2789 \fB\-\-reboot\-argument=\fR
2790 .RS 4
2791 This switch is used with
2792 \fBreboot\fR\&. The value is architecture and firmware specific\&. As an example,
2793 "recovery"
2794 might be used to trigger system recovery, and
2795 "fota"
2796 might be used to trigger a
2797 \(lqfirmware over the air\(rq
2798 update\&.
2799 .sp
2800 Added in version 246\&.
2801 .RE
2802 .PP
2803 \fB\-\-plain\fR
2804 .RS 4
2805 When used with
2806 \fBlist\-dependencies\fR,
2807 \fBlist\-units\fR
2808 or
2809 \fBlist\-machines\fR, the output is printed as a list instead of a tree, and the bullet circles are omitted\&.
2810 .sp
2811 Added in version 203\&.
2812 .RE
2813 .PP
2814 \fB\-\-timestamp=\fR
2815 .RS 4
2816 Change the format of printed timestamps\&. The following values may be used:
2817 .PP
2818 \fBpretty\fR (this is the default)
2819 .RS 4
2820 "Day YYYY\-MM\-DD HH:MM:SS TZ"
2821 .sp
2822 Added in version 248\&.
2823 .RE
2824 .PP
2825 \fBunix\fR
2826 .RS 4
2827 "@seconds\-since\-the\-epoch"
2828 .sp
2829 Added in version 251\&.
2830 .RE
2831 .PP
2832 \fBus\fR, \fBμs\fR
2833 .RS 4
2834 "Day YYYY\-MM\-DD HH:MM:SS\&.UUUUUU TZ"
2835 .sp
2836 Added in version 248\&.
2837 .RE
2838 .PP
2839 \fButc\fR
2840 .RS 4
2841 "Day YYYY\-MM\-DD HH:MM:SS UTC"
2842 .sp
2843 Added in version 248\&.
2844 .RE
2845 .PP
2846 \fBus+utc\fR, \fBμs+utc\fR
2847 .RS 4
2848 "Day YYYY\-MM\-DD HH:MM:SS\&.UUUUUU UTC"
2849 .sp
2850 Added in version 248\&.
2851 .RE
2852 .sp
2853 Added in version 247\&.
2854 .RE
2855 .PP
2856 \fB\-\-mkdir\fR
2857 .RS 4
2858 When used with
2859 \fBbind\fR, creates the destination file or directory before applying the bind mount\&. Note that even though the name of this option suggests that it is suitable only for directories, this option also creates the destination file node to mount over if the object to mount is not a directory, but a regular file, device node, socket or FIFO\&.
2860 .sp
2861 Added in version 248\&.
2862 .RE
2863 .PP
2864 \fB\-\-marked\fR
2865 .RS 4
2866 Only allowed with
2867 \fBreload\-or\-restart\fR\&. Enqueues restart jobs for all units that have the
2868 "needs\-restart"
2869 mark, and reload jobs for units that have the
2870 "needs\-reload"
2871 mark\&. When a unit marked for reload does not support reload, restart will be queued\&. Those properties can be set using
2872 \fBset\-property Markers=\&...\fR\&.
2873 .sp
2874 Unless
2875 \fB\-\-no\-block\fR
2876 is used,
2877 \fBsystemctl\fR
2878 will wait for the queued jobs to finish\&.
2879 .sp
2880 Added in version 248\&.
2881 .RE
2882 .PP
2883 \fB\-\-read\-only\fR
2884 .RS 4
2885 When used with
2886 \fBbind\fR, creates a read\-only bind mount\&.
2887 .sp
2888 Added in version 248\&.
2889 .RE
2890 .PP
2891 \fB\-\-drop\-in=\fR\fB\fINAME\fR\fR
2892 .RS 4
2893 When used with
2894 \fBedit\fR, use
2895 \fINAME\fR
2896 as the drop\-in file name instead of
2897 override\&.conf\&.
2898 .sp
2899 Added in version 253\&.
2900 .RE
2901 .PP
2902 \fB\-\-when=\fR
2903 .RS 4
2904 When used with
2905 \fBhalt\fR,
2906 \fBpoweroff\fR,
2907 \fBreboot\fR
2908 or
2909 \fBkexec\fR, schedule the action to be performed at the given timestamp, which should adhere to the syntax documented in
2910 \fBsystemd.time\fR(7)
2911 section "PARSING TIMESTAMPS"\&. Specially, if
2912 "show"
2913 is given, the currently scheduled action will be shown, which can be canceled by passing an empty string or
2914 "cancel"\&.
2915 "auto"
2916 will schedule the action according to maintenance window or one minute in the future\&.
2917 .sp
2918 Added in version 254\&.
2919 .RE
2920 .PP
2921 \fB\-\-stdin\fR
2922 .RS 4
2923 When used with
2924 \fBedit\fR, the contents of the file will be read from standard input and the editor will not be launched\&. In this mode, the old contents of the file are completely replaced\&. This is useful to "edit" unit files from scripts:
2925 .sp
2926 .if n \{\
2927 .RS 4
2928 .\}
2929 .nf
2930 $ systemctl edit \-\-drop\-in=limits\&.conf \-\-stdin some\-service\&.service <<EOF
2931 [Unit]
2932 AllowedCPUs=7,11
2933 EOF
2934 .fi
2935 .if n \{\
2936 .RE
2937 .\}
2938 .sp
2939 Multiple drop\-ins may be "edited" in this mode; the same contents will be written to all of them\&.
2940 .sp
2941 Added in version 256\&.
2942 .RE
2943 .PP
2944 \fB\-H\fR, \fB\-\-host=\fR
2945 .RS 4
2946 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
2947 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
2948 ":", and then a container name, separated by
2949 "/", 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
2950 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
2951 .RE
2952 .PP
2953 \fB\-M\fR, \fB\-\-machine=\fR
2954 .RS 4
2955 Execute operation on a local container\&. Specify a container name to connect to, optionally prefixed by a user name to connect as and a separating
2956 "@"
2957 character\&. If the special string
2958 "\&.host"
2959 is used in place of the container name, a connection to the local system is made (which is useful to connect to a specific user\*(Aqs user bus:
2960 "\-\-user \-\-machine=lennart@\&.host")\&. If the
2961 "@"
2962 syntax is not used, the connection is made as root user\&. If the
2963 "@"
2964 syntax is used either the left hand side or the right hand side may be omitted (but not both) in which case the local user name and
2965 "\&.host"
2966 are implied\&.
2967 .RE
2968 .PP
2969 \fB\-C\fR, \fB\-\-capsule=\fR
2970 .RS 4
2971 Execute operation on a capsule\&. Specify a capsule name to connect to\&. See
2972 \[email protected]\fR(5)
2973 for details about capsules\&.
2974 .sp
2975 Added in version 256\&.
2976 .RE
2977 .PP
2978 \fB\-\-no\-ask\-password\fR
2979 .RS 4
2980 Do not query the user for authentication for privileged operations\&.
2981 .RE
2982 .PP
2983 \fB\-\-no\-pager\fR
2984 .RS 4
2985 Do not pipe output into a pager\&.
2986 .RE
2987 .PP
2988 \fB\-\-legend=\fR\fB\fIBOOL\fR\fR
2989 .RS 4
2990 Enable or disable printing of the legend, i\&.e\&. column headers and the footer with hints\&. The legend is printed by default, unless disabled with
2991 \fB\-\-quiet\fR
2992 or similar\&.
2993 .RE
2994 .PP
2995 \fB\-h\fR, \fB\-\-help\fR
2996 .RS 4
2997 Print a short help text and exit\&.
2998 .RE
2999 .PP
3000 \fB\-\-version\fR
3001 .RS 4
3002 Print a short version string and exit\&.
3003 .RE
3004 .SH "EXIT STATUS"
3005 .PP
3006 On success, 0 is returned, a non\-zero failure code otherwise\&.
3007 .PP
3008 \fBsystemctl\fR
3009 uses the return codes defined by LSB, as defined in
3010 \m[blue]\fBLSB 3\&.0\&.0\fR\m[]\&\s-2\u[3]\d\s+2\&.
3011 .sp
3012 .it 1 an-trap
3013 .nr an-no-space-flag 1
3014 .nr an-break-flag 1
3015 .br
3016 .B Table\ \&5.\ \&LSB return codes
3017 .TS
3018 allbox tab(:);
3019 lB lB lB.
3020 T{
3021 Value
3022 T}:T{
3023 Description in LSB
3024 T}:T{
3025 Use in systemd
3026 T}
3027 .T&
3028 l l l
3029 l l l
3030 l l l
3031 l l l
3032 l l l.
3033 T{
3034 \fB0\fR
3035 T}:T{
3036 "program is running or service is OK"
3037 T}:T{
3038 unit is active
3039 T}
3040 T{
3041 \fB1\fR
3042 T}:T{
3043 "program is dead and /var/run pid file exists"
3044 T}:T{
3045 unit \fInot\fR failed (used by \fBis\-failed\fR)
3046 T}
3047 T{
3048 \fB2\fR
3049 T}:T{
3050 "program is dead and /var/lock lock file exists"
3051 T}:T{
3052 unused
3053 T}
3054 T{
3055 \fB3\fR
3056 T}:T{
3057 "program is not running"
3058 T}:T{
3059 unit is not active
3060 T}
3061 T{
3062 \fB4\fR
3063 T}:T{
3064 "program or service status is unknown"
3065 T}:T{
3066 no such unit
3067 T}
3068 .TE
3069 .sp 1
3070 .PP
3071 The mapping of LSB service states to systemd unit states is imperfect, so it is better to not rely on those return values but to look for specific unit states and substates instead\&.
3072 .SH "ENVIRONMENT"
3073 .PP
3074 \fI$SYSTEMD_EDITOR\fR
3075 .RS 4
3076 Editor to use when editing units; overrides
3077 \fI$EDITOR\fR
3078 and
3079 \fI$VISUAL\fR\&. If neither
3080 \fI$SYSTEMD_EDITOR\fR
3081 nor
3082 \fI$EDITOR\fR
3083 nor
3084 \fI$VISUAL\fR
3085 are present or if it is set to an empty string or if their execution failed, systemctl will try to execute well known editors in this order:
3086 \fBeditor\fR(1),
3087 \fBnano\fR(1),
3088 \fBvim\fR(1),
3089 \fBvi\fR(1)\&.
3090 .sp
3091 Added in version 218\&.
3092 .RE
3093 .PP
3094 \fI$SYSTEMD_LOG_LEVEL\fR
3095 .RS 4
3096 The maximum log level of emitted messages (messages with a higher log level, i\&.e\&. less important ones, will be suppressed)\&. Takes a comma\-separated list of values\&. A value may be either one of (in order of decreasing importance)
3097 \fBemerg\fR,
3098 \fBalert\fR,
3099 \fBcrit\fR,
3100 \fBerr\fR,
3101 \fBwarning\fR,
3102 \fBnotice\fR,
3103 \fBinfo\fR,
3104 \fBdebug\fR, or an integer in the range 0\&...7\&. See
3105 \fBsyslog\fR(3)
3106 for more information\&. Each value may optionally be prefixed with one of
3107 \fBconsole\fR,
3108 \fBsyslog\fR,
3109 \fBkmsg\fR
3110 or
3111 \fBjournal\fR
3112 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
3113 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
3114 specifies to log at debug level except when logging to the console which should be at info level)\&. Note that the global maximum log level takes priority over any per target maximum log levels\&.
3115 .RE
3116 .PP
3117 \fI$SYSTEMD_LOG_COLOR\fR
3118 .RS 4
3119 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
3120 .sp
3121 This setting is only useful when messages are written directly to the terminal, because
3122 \fBjournalctl\fR(1)
3123 and other tools that display logs will color messages based on the log level on their own\&.
3124 .RE
3125 .PP
3126 \fI$SYSTEMD_LOG_TIME\fR
3127 .RS 4
3128 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
3129 .sp
3130 This setting is only useful when messages are written directly to the terminal or a file, because
3131 \fBjournalctl\fR(1)
3132 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
3133 .RE
3134 .PP
3135 \fI$SYSTEMD_LOG_LOCATION\fR
3136 .RS 4
3137 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
3138 .sp
3139 Note that the log location is often attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
3140 .RE
3141 .PP
3142 \fI$SYSTEMD_LOG_TARGET\fR
3143 .RS 4
3144 The destination for log messages\&. One of
3145 \fBconsole\fR
3146 (log to the attached tty),
3147 \fBconsole\-prefixed\fR
3148 (log to the attached tty but with prefixes encoding the log level and "facility", see
3149 \fBsyslog\fR(3),
3150 \fBkmsg\fR
3151 (log to the kernel circular log buffer),
3152 \fBjournal\fR
3153 (log to the journal),
3154 \fBjournal\-or\-kmsg\fR
3155 (log to the journal if available, and to kmsg otherwise),
3156 \fBauto\fR
3157 (determine the appropriate log target automatically, the default),
3158 \fBnull\fR
3159 (disable log output)\&.
3160 .RE
3161 .PP
3162 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
3163 .RS 4
3164 Pager to use when
3165 \fB\-\-no\-pager\fR
3166 is not given\&.
3167 \fI$SYSTEMD_PAGER\fR
3168 is used if set; otherwise
3169 \fI$PAGER\fR
3170 is used\&. If neither
3171 \fI$SYSTEMD_PAGER\fR
3172 nor
3173 \fI$PAGER\fR
3174 are set, a set of well\-known pager implementations is tried in turn, including
3175 \fBless\fR(1)
3176 and
3177 \fBmore\fR(1), until one is found\&. If no pager implementation is discovered, no pager is invoked\&. Setting those environment variables to an empty string or the value
3178 "cat"
3179 is equivalent to passing
3180 \fB\-\-no\-pager\fR\&.
3181 .sp
3182 Note: if
3183 \fI$SYSTEMD_PAGERSECURE\fR
3184 is not set,
3185 \fI$SYSTEMD_PAGER\fR
3186 and
3187 \fI$PAGER\fR
3188 can only be used to disable the pager (with
3189 "cat"
3190 or
3191 ""), and are otherwise ignored\&.
3192 .RE
3193 .PP
3194 \fI$SYSTEMD_LESS\fR
3195 .RS 4
3196 Override the options passed to
3197 \fBless\fR
3198 (by default
3199 "FRSXMK")\&.
3200 .sp
3201 Users might want to change two options in particular:
3202 .PP
3203 \fBK\fR
3204 .RS 4
3205 This option instructs the pager to exit immediately when
3206 Ctrl+C
3207 is pressed\&. To allow
3208 \fBless\fR
3209 to handle
3210 Ctrl+C
3211 itself to switch back to the pager command prompt, unset this option\&.
3212 .sp
3213 If the value of
3214 \fI$SYSTEMD_LESS\fR
3215 does not include
3216 "K", and the pager that is invoked is
3217 \fBless\fR,
3218 Ctrl+C
3219 will be ignored by the executable, and needs to be handled by the pager\&.
3220 .RE
3221 .PP
3222 \fBX\fR
3223 .RS 4
3224 This option instructs the pager to not send termcap initialization and deinitialization strings to the terminal\&. It is set by default to allow command output to remain visible in the terminal even after the pager exits\&. Nevertheless, this prevents some pager functionality from working, in particular paged output cannot be scrolled with the mouse\&.
3225 .RE
3226 .sp
3227 Note that setting the regular
3228 \fI$LESS\fR
3229 environment variable has no effect for
3230 \fBless\fR
3231 invocations by systemd tools\&.
3232 .sp
3233 See
3234 \fBless\fR(1)
3235 for more discussion\&.
3236 .RE
3237 .PP
3238 \fI$SYSTEMD_LESSCHARSET\fR
3239 .RS 4
3240 Override the charset passed to
3241 \fBless\fR
3242 (by default
3243 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
3244 .sp
3245 Note that setting the regular
3246 \fI$LESSCHARSET\fR
3247 environment variable has no effect for
3248 \fBless\fR
3249 invocations by systemd tools\&.
3250 .RE
3251 .PP
3252 \fI$SYSTEMD_PAGERSECURE\fR
3253 .RS 4
3254 Common pager commands like
3255 \fBless\fR(1), in addition to "paging", i\&.e\&. scrolling through the output, support opening of or writing to other files and running arbitrary shell commands\&. When commands are invoked with elevated privileges, for example under
3256 \fBsudo\fR(8)
3257 or
3258 \fBpkexec\fR(1), the pager becomes a security boundary\&. Care must be taken that only programs with strictly limited functionality are used as pagers, and unintended interactive features like opening or creation of new files or starting of subprocesses are not allowed\&. "Secure mode" for the pager may be enabled as described below,
3259 \fIif the pager supports that\fR
3260 (most pagers are not written in a way that takes this into consideration)\&. It is recommended to either explicitly enable "secure mode" or to completely disable the pager using
3261 \fB\-\-no\-pager\fR
3262 or
3263 \fIPAGER=cat\fR
3264 when allowing untrusted users to execute commands with elevated privileges\&.
3265 .sp
3266 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
3267 \fBLESSSECURE=1\fR
3268 will be set when invoking the pager, which instructs the pager to disable commands that open or create new files or start new subprocesses\&. Currently only
3269 \fBless\fR(1)
3270 is known to understand this variable and implement "secure mode"\&.
3271 .sp
3272 When set to false, no limitation is placed on the pager\&. Setting
3273 \fISYSTEMD_PAGERSECURE=0\fR
3274 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
3275 .sp
3276 When
3277 \fI$SYSTEMD_PAGERSECURE\fR
3278 is not set, systemd tools attempt to automatically figure out if "secure mode" should be enabled and whether the pager supports it\&. "Secure mode" is enabled if the effective UID is not the same as the owner of the login session, see
3279 \fBgeteuid\fR(2)
3280 and
3281 \fBsd_pid_get_owner_uid\fR(3), or when running under
3282 \fBsudo\fR(8)
3283 or similar tools (\fI$SUDO_UID\fR
3284 is set
3285 \&\s-2\u[4]\d\s+2)\&. In those cases,
3286 \fISYSTEMD_PAGERSECURE=1\fR
3287 will be set and pagers which are not known to implement "secure mode" will not be used at all\&. Note that this autodetection only covers the most common mechanisms to elevate privileges and is intended as convenience\&. It is recommended to explicitly set
3288 \fI$SYSTEMD_PAGERSECURE\fR
3289 or disable the pager\&.
3290 .sp
3291 Note that if the
3292 \fI$SYSTEMD_PAGER\fR
3293 or
3294 \fI$PAGER\fR
3295 variables are to be honoured, other than to disable the pager,
3296 \fI$SYSTEMD_PAGERSECURE\fR
3297 must be set too\&.
3298 .RE
3299 .PP
3300 \fI$SYSTEMD_COLORS\fR
3301 .RS 4
3302 Takes a boolean argument\&. When true,
3303 \fBsystemd\fR
3304 and related utilities will use colors in their output, otherwise the output will be monochrome\&. Additionally, the variable can take one of the following special values:
3305 "16",
3306 "256"
3307 to restrict the use of colors to the base 16 or 256 ANSI colors, respectively\&. This can be specified to override the automatic decision based on
3308 \fI$TERM\fR
3309 and what the console is connected to\&.
3310 .RE
3311 .PP
3312 \fI$SYSTEMD_URLIFY\fR
3313 .RS 4
3314 The value must be a boolean\&. Controls whether clickable links should be generated in the output for terminal emulators supporting this\&. This can be specified to override the decision that
3315 \fBsystemd\fR
3316 makes based on
3317 \fI$TERM\fR
3318 and other conditions\&.
3319 .RE
3320 .SH "SEE ALSO"
3321 .PP
3322 \fBsystemd\fR(1), \fBjournalctl\fR(1), \fBloginctl\fR(1), \fBmachinectl\fR(1), \fBsystemd.unit\fR(5), \fBsystemd.resource-control\fR(5), \fBsystemd.special\fR(7), \fBwall\fR(1), \fBsystemd.preset\fR(5), \fBsystemd.generator\fR(7), \fBglob\fR(7)
3323 .SH "NOTES"
3324 .IP " 1." 4
3325 Boot Loader Specification
3326 .RS 4
3327 \%https://uapi-group.org/specifications/specs/boot_loader_specification
3328 .RE
3329 .IP " 2." 4
3330 Discoverable Partitions Specification
3331 .RS 4
3332 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
3333 .RE
3334 .IP " 3." 4
3335 LSB 3.0.0
3336 .RS 4
3337 \%http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
3338 .RE
3339 .IP " 4." 4
3340 It is recommended for other tools to set and check
3341 \fI$SUDO_UID\fR
3342 as appropriate, treating it is a common interface.
3343