Debian Codegraph @

upstream/debian-unstable/man1/systemctl.1

raw
1 '\" t
2 .TH "SYSTEMCTL" "1" "" "systemd 261~rc3" "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 or ordering cycles, 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 \fBenqueue\-marked\fR
573 .RS 4
574 Enqueue start/stop/restart/reload jobs for all units that have the respective
575 "needs\-*"
576 markers set\&. When a unit marked for reload does not support reload, restart will be queued\&. Those properties can be set using
577 \fBset\-property Markers=\&...\fR\&.
578 .sp
579 Unless
580 \fB\-\-no\-block\fR
581 is used,
582 \fBsystemctl\fR
583 will wait for the queued jobs to finish\&.
584 .sp
585 Added in version 260\&.
586 .RE
587 .PP
588 \fBreload\-or\-restart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
589 .RS 4
590 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\&.
591 .sp
592 When used in combination with
593 \fB\-\-marked\fR, it is a deprecated alias of
594 \fBenqueue\-marked\fR\&.
595 .RE
596 .PP
597 \fBtry\-reload\-or\-restart \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
598 .RS 4
599 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\&.
600 .sp
601 Added in version 229\&.
602 .RE
603 .PP
604 \fBisolate \fR\fB\fIUNIT\fR\fR
605 .RS 4
606 Start the unit specified on the command line and its dependencies and stop all others, unless they have
607 \fBIgnoreOnIsolate=yes\fR
608 (see
609 \fBsystemd.unit\fR(5))\&. If a unit name with no extension is given, an extension of
610 "\&.target"
611 will be assumed\&.
612 .sp
613 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\&.
614 .sp
615 Note that this operation is allowed only on units where
616 \fBAllowIsolate=\fR
617 is enabled\&. See
618 \fBsystemd.unit\fR(5)
619 for details\&.
620 .RE
621 .PP
622 \fBkill \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
623 .RS 4
624 Send a UNIX process signal to one or more processes of the unit\&. Use
625 \fB\-\-kill\-whom=\fR
626 to select which process to send the signal to\&. Use
627 \fB\-\-signal=\fR
628 to select the signal to send\&. Combine with
629 \fB\-\-kill\-value=\fR
630 to enqueue a POSIX Realtime Signal with an associated value\&.
631 .RE
632 .PP
633 \fBclean \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
634 .RS 4
635 Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units\&. Use
636 \fB\-\-what=\fR
637 to select which kind of resource to remove\&. For service units this may be used to remove the directories configured with
638 \fIConfigurationDirectory=\fR,
639 \fIStateDirectory=\fR,
640 \fICacheDirectory=\fR,
641 \fILogsDirectory=\fR
642 and
643 \fIRuntimeDirectory=\fR, see
644 \fBsystemd.exec\fR(5)
645 for details\&. It may also be used to clear the file descriptor store as enabled via
646 \fIFileDescriptorStoreMax=\fR, see
647 \fBsystemd.service\fR(5)
648 for details\&. For timer units this may be used to clear out the persistent timestamp data if
649 \fIPersistent=\fR
650 is used and
651 \fB\-\-what=state\fR
652 is selected, see
653 \fBsystemd.timer\fR(5)\&. This command only applies to units that use either of these settings\&. If
654 \fB\-\-what=\fR
655 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 separated by commas\&. Note that the specified units must be stopped to invoke this operation\&.
656 .sp
657 .it 1 an-trap
658 .nr an-no-space-flag 1
659 .nr an-break-flag 1
660 .br
661 .B Table\ \&2.\ \& Possible values for \-\-what=
662 .TS
663 allbox tab(:);
664 lB lB.
665 T{
666 Value
667 T}:T{
668 Unit Setting
669 T}
670 .T&
671 l l
672 l l
673 l l
674 l l
675 l l
676 l l
677 l l
678 l l.
679 T{
680 "runtime"
681 T}:T{
682 \fIRuntimeDirectory=\fR
683 T}
684 T{
685 "state"
686 T}:T{
687 \fIStateDirectory=\fR
688 T}
689 T{
690 "cache"
691 T}:T{
692 \fICacheDirectory=\fR
693 T}
694 T{
695 "logs"
696 T}:T{
697 \fILogsDirectory=\fR
698 T}
699 T{
700 "configuration"
701 T}:T{
702 \fIConfigurationDirectory=\fR
703 T}
704 T{
705 "fdstore"
706 T}:T{
707 \fIFileDescriptorStorePreserve=\fR
708 T}
709 T{
710 "all"
711 T}:T{
712 All of the above
713 T}
714 T{
715 "help"
716 T}:T{
717 Show the supported values and exit
718 T}
719 .TE
720 .sp 1
721 Added in version 243\&.
722 .RE
723 .PP
724 \fBfreeze \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
725 .RS 4
726 Freeze one or more units specified on the command line using cgroup freezer
727 .sp
728 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\&.
729 .sp
730 Added in version 246\&.
731 .RE
732 .PP
733 \fBthaw \fR\fB\fIPATTERN\fR\fR\fB\&...\fR
734 .RS 4
735 Thaw (unfreeze) one or more units specified on the command line\&.
736 .sp
737 This is the inverse operation to the
738 \fBfreeze\fR
739 command and resumes the execution of processes in the unit\*(Aqs cgroup\&.
740 .sp
741 Added in version 246\&.
742 .RE
743 .PP
744 \fBset\-property \fR\fB\fIUNIT\fR\fR\fB \fR\fB\fIPROPERTY\fR\fR\fB=\fR\fB\fIVALUE\fR\fR\fB\&...\fR
745 .RS 4
746 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
747 \fBsystemd.resource-control\fR(5)) may\&. The changes are applied immediately, and stored on disk for future boots, unless
748 \fB\-\-runtime\fR
749 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\&.
750 .sp
751 Example:
752 \fBsystemctl set\-property foobar\&.service CPUWeight=200\fR
753 .sp
754 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\&.
755 .sp
756 Note that this command allows changing multiple properties at the same time, which is preferable over setting them individually\&.
757 .sp
758 Example:
759 \fBsystemctl set\-property foobar\&.service CPUWeight=200 MemoryMax=2G IPAccounting=yes\fR
760 .sp
761 Like with unit file configuration settings, assigning an empty setting usually resets a property to its defaults\&.
762 .sp
763 Example:
764 \fBsystemctl set\-property avahi\-daemon\&.service IPAddressDeny=\fR
765 .sp
766 Added in version 206\&.
767 .RE
768 .PP
769 \fBbind\fR \fIUNIT\fR \fIPATH\fR [\fIPATH\fR]
770 .RS 4
771 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
772 \fB\-\-read\-only\fR
773 switch, a read\-only bind mount is created\&. When combined with the
774 \fB\-\-mkdir\fR
775 switch, the destination path is first created before the mount is applied\&.
776 .sp
777 Note that this option is currently only supported for units that run within a mount namespace (e\&.g\&.: with
778 \fBRootImage=\fR,
779 \fBPrivateMounts=\fR, etc\&.)\&. This command supports bind\-mounting directories, regular files, device nodes,
780 \fBAF_UNIX\fR
781 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
782 \fBExecReload=\fR,
783 \fBExecStartPre=\fR, etc\&.) run in distinct namespaces\&.
784 .sp
785 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\&.
786 .sp
787 Added in version 248\&.
788 .RE
789 .PP
790 \fBmount\-image\fR \fIUNIT\fR \fIIMAGE\fR [\fIPATH\fR [\fIPARTITION_NAME\fR:\fIMOUNT_OPTIONS\fR]]
791 .RS 4
792 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
793 \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
794 \fBMountImages=\fR
795 setting\&. When combined with the
796 \fB\-\-read\-only\fR
797 switch, a ready\-only mount is created\&. When combined with the
798 \fB\-\-mkdir\fR
799 switch, the destination path is first created before the mount is applied\&.
800 .sp
801 Note that this option is currently only supported for units that run within a mount namespace (i\&.e\&. with
802 \fBRootImage=\fR,
803 \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
804 \fBExecReload=\fR,
805 \fBExecStartPre=\fR, etc\&.) run in distinct namespaces\&.
806 .sp
807 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\&.
808 .sp
809 Example:
810 .sp
811 .if n \{\
812 .RS 4
813 .\}
814 .nf
815 systemctl mount\-image foo\&.service /tmp/img\&.raw /var/lib/image root:ro,nosuid
816 .fi
817 .if n \{\
818 .RE
819 .\}
820 .sp
821
822 .sp
823 .if n \{\
824 .RS 4
825 .\}
826 .nf
827 systemctl mount\-image \-\-mkdir bar\&.service /tmp/img\&.raw /var/lib/baz/img
828 .fi
829 .if n \{\
830 .RE
831 .\}
832 .sp
833 Added in version 248\&.
834 .RE
835 .PP
836 \fBservice\-log\-level\fR \fISERVICE\fR [\fILEVEL\fR]
837 .RS 4
838 If the
839 \fILEVEL\fR
840 argument is not given, print the current log level as reported by service
841 \fISERVICE\fR\&.
842 .sp
843 If the optional argument
844 \fILEVEL\fR
845 is provided, then change the current log level of the service to
846 \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
847 \fBemerg\fR,
848 \fBalert\fR,
849 \fBcrit\fR,
850 \fBerr\fR,
851 \fBwarning\fR,
852 \fBnotice\fR,
853 \fBinfo\fR,
854 \fBdebug\fR; see
855 \fBsyslog\fR(3)
856 for details\&.
857 .sp
858 The service must have the appropriate
859 \fIBusName=\fR\fI\fIdestination\fR\fR
860 property and also implement the generic
861 \fBorg.freedesktop.LogControl1\fR(5)
862 interface\&. (systemctl
863 will use the generic D\-Bus protocol to access the
864 org\&.freedesktop\&.LogControl1\&.LogLevel
865 interface for the D\-Bus name
866 \fIdestination\fR\&.)
867 .sp
868 Added in version 247\&.
869 .RE
870 .PP
871 \fBservice\-log\-target\fR \fISERVICE\fR [\fITARGET\fR]
872 .RS 4
873 If the
874 \fITARGET\fR
875 argument is not given, print the current log target as reported by service
876 \fISERVICE\fR\&.
877 .sp
878 If the optional argument
879 \fITARGET\fR
880 is provided, then change the current log target of the service to
881 \fITARGET\fR\&. The log target should be one of the strings
882 \fBconsole\fR
883 (for log output to the service\*(Aqs standard error stream),
884 \fBkmsg\fR
885 (for log output to the kernel log buffer),
886 \fBjournal\fR
887 (for log output to
888 \fBsystemd-journald.service\fR(8)
889 using the native journal protocol),
890 \fBsyslog\fR
891 (for log output to the classic syslog socket
892 /dev/log),
893 \fBnull\fR
894 (for no log output whatsoever) or
895 \fBauto\fR
896 (for an automatically determined choice, typically equivalent to
897 \fBconsole\fR
898 if the service is invoked interactively, and
899 \fBjournal\fR
900 or
901 \fBsyslog\fR
902 otherwise)\&.
903 .sp
904 For most services, only a small subset of log targets make sense\&. In particular, most "normal" services should only implement
905 \fBconsole\fR,
906 \fBjournal\fR, and
907 \fBnull\fR\&. Anything else is only appropriate for low\-level services that are active in very early boot before proper logging is established\&.
908 .sp
909 The service must have the appropriate
910 \fIBusName=\fR\fI\fIdestination\fR\fR
911 property and also implement the generic
912 \fBorg.freedesktop.LogControl1\fR(5)
913 interface\&. (systemctl
914 will use the generic D\-Bus protocol to access the
915 org\&.freedesktop\&.LogControl1\&.LogLevel
916 interface for the D\-Bus name
917 \fIdestination\fR\&.)
918 .sp
919 Added in version 247\&.
920 .RE
921 .PP
922 \fBreset\-failed [\fR\fB\fIPATTERN\fR\fR\fB\&...]\fR
923 .RS 4
924 Reset the
925 "failed"
926 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
927 "failed"
928 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\&.
929 .sp
930 In addition to resetting the
931 "failed"
932 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
933 \fIStartLimitIntervalSec=\fR/\fIStartLimitBurst=\fR) is hit and the unit refuses to be started again, use this command to make it startable again\&.
934 .RE
935 .PP
936 \fBwhoami [\fR\fB\fIPID\fR\fR\fB\&...]\fR
937 .RS 4
938 Returns the units the processes referenced by the given PIDs belong to (one per line)\&. If no PID is specified returns the unit the
939 \fBsystemctl\fR
940 command is invoked in\&.
941 .sp
942 Added in version 254\&.
943 .RE
944 .SS "Unit File Commands"
945 .PP
946 \fBlist\-unit\-files\fR [\fIPATTERN\&...\fR]
947 .RS 4
948 List unit files installed on the system, in combination with their enablement state (as reported by
949 \fBis\-enabled\fR)\&. If one or more
950 \fIPATTERN\fRs are specified, only unit files whose name matches one of them are shown (patterns matching unit file system paths are not supported)\&.
951 .sp
952 Unlike
953 \fBlist\-units\fR
954 this command will list template units in addition to explicitly instantiated units\&.
955 .sp
956 Added in version 233\&.
957 .RE
958 .PP
959 \fBenable \fR\fB\fIUNIT\fR\fR\fB\&...\fR, \fBenable \fR\fB\fIPATH\fR\fR\fB\&...\fR
960 .RS 4
961 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
962 \fBdaemon\-reload\fR), in order to ensure the changes are taken into account immediately\&. Note that this does
963 \fInot\fR
964 have the effect of also starting any of the units being enabled\&. If this is desired, combine this command with the
965 \fB\-\-now\fR
966 switch, or invoke
967 \fBstart\fR
968 with appropriate arguments later\&. Note that in case of unit instance enablement (i\&.e\&. enablement of units of the form
969 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\&.
970 .sp
971 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
972 \fBstart\fR\&. The file system where the linked unit files are located must be accessible when systemd is started (e\&.g\&. anything underneath
973 /home/
974 or
975 /var/
976 is not allowed, unless those directories are located on the root file system)\&.
977 .sp
978 This command will print the file system operations executed\&. This output may be suppressed by passing
979 \fB\-\-quiet\fR\&.
980 .sp
981 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
982 \fBdaemon\-reload\fR
983 manually as necessary, in order to ensure the changes are taken into account\&.
984 .sp
985 When using this operation on units without install information, a warning about it is shown\&.
986 \fB\-\-no\-warn\fR
987 can be used to suppress the warning\&.
988 .sp
989 Enabling units should not be confused with starting (activating) units, as done by the
990 \fBstart\fR
991 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\&.
992 .sp
993 Depending on whether
994 \fB\-\-system\fR,
995 \fB\-\-user\fR,
996 \fB\-\-runtime\fR, or
997 \fB\-\-global\fR
998 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\&.
999 .sp
1000 Using
1001 \fBenable\fR
1002 on masked units is not supported and results in an error\&.
1003 .RE
1004 .PP
1005 \fBdisable \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1006 .RS 4
1007 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
1008 \fBenable\fR
1009 or
1010 \fBlink\fR\&. Note that this removes
1011 \fIall\fR
1012 symlinks to matching unit files, including manually created symlinks, and not just those actually created by
1013 \fBenable\fR
1014 or
1015 \fBlink\fR\&. Note that while
1016 \fBdisable\fR
1017 undoes the effect of
1018 \fBenable\fR, the two commands are otherwise not symmetric, as
1019 \fBdisable\fR
1020 may remove more symlinks than a prior
1021 \fBenable\fR
1022 invocation of the same unit created\&.
1023 .sp
1024 This command expects valid unit names only, it does not accept paths to unit files\&.
1025 .sp
1026 In addition to the units specified as arguments, all units are disabled that are listed in the
1027 \fIAlso=\fR
1028 setting contained in the [Install] section of any of the unit files being operated on\&.
1029 .sp
1030 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
1031 \fB\-\-now\fR
1032 switch, or invoke the
1033 \fBstop\fR
1034 command with appropriate arguments later\&.
1035 .sp
1036 This command will print information about the file system operations (symlink removals) executed\&. This output may be suppressed by passing
1037 \fB\-\-quiet\fR\&.
1038 .sp
1039 If a unit gets disabled but its triggering units are still active, a warning containing the names of the triggering units is shown\&.
1040 \fB\-\-no\-warn\fR
1041 can be used to suppress the warning\&.
1042 .sp
1043 When this command is used with
1044 \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
1045 \fB\-\-no\-warn\fR\&.
1046 .sp
1047 This command honors
1048 \fB\-\-system\fR,
1049 \fB\-\-user\fR,
1050 \fB\-\-runtime\fR,
1051 \fB\-\-global\fR
1052 and
1053 \fB\-\-no\-warn\fR
1054 in a similar way as
1055 \fBenable\fR\&.
1056 .sp
1057 Added in version 238\&.
1058 .RE
1059 .PP
1060 \fBreenable \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1061 .RS 4
1062 Reenable one or more units, as specified on the command line\&. This is a combination of
1063 \fBdisable\fR
1064 and
1065 \fBenable\fR
1066 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\&.
1067 .sp
1068 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
1069 \fB\-\-now\fR
1070 switch, or invoke the
1071 \fBtry\-restart\fR
1072 command with appropriate arguments later\&.
1073 .sp
1074 Added in version 238\&.
1075 .RE
1076 .PP
1077 \fBpreset \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1078 .RS 4
1079 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
1080 \fBdisable\fR
1081 or
1082 \fBenable\fR, depending how the unit is listed in the preset files\&.
1083 .sp
1084 Use
1085 \fB\-\-preset\-mode=\fR
1086 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
1087 .sp
1088 If the unit carries no install information, it will be silently ignored by this command\&.
1089 \fIUNIT\fR
1090 must be the real unit name, any alias names are ignored silently\&.
1091 .sp
1092 For more information on the preset policy format, see
1093 \fBsystemd.preset\fR(5)\&.
1094 .sp
1095 Added in version 238\&.
1096 .RE
1097 .PP
1098 \fBpreset\-all\fR
1099 .RS 4
1100 Resets all installed unit files to the defaults configured in the preset policy file (see above)\&.
1101 .sp
1102 Use
1103 \fB\-\-preset\-mode=\fR
1104 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
1105 .sp
1106 Added in version 215\&.
1107 .RE
1108 .PP
1109 \fBis\-enabled \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1110 .RS 4
1111 Checks whether any of the specified unit files are enabled (as with
1112 \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
1113 \fB\-\-quiet\fR\&. To show installation targets, use
1114 \fB\-\-full\fR\&.
1115 .sp
1116 .it 1 an-trap
1117 .nr an-no-space-flag 1
1118 .nr an-break-flag 1
1119 .br
1120 .B Table\ \&3.\ \& is\-enabled output
1121 .TS
1122 allbox tab(:);
1123 lB lB lB.
1124 T{
1125 Name
1126 T}:T{
1127 Description
1128 T}:T{
1129 Exit Code
1130 T}
1131 .T&
1132 l l l
1133 l ^ ^
1134 l l l
1135 l ^ ^
1136 l l l
1137 l l l
1138 l ^ ^
1139 l l l
1140 l l l
1141 l l l
1142 l l l
1143 l l l
1144 l l l
1145 l l l.
1146 T{
1147 "enabled"
1148 T}:T{
1149 Enabled via \&.wants/, \&.requires/ or \fIAlias=\fR symlinks (permanently in /etc/systemd/system/, or transiently in /run/systemd/system/)\&.
1150 T}:T{
1151 0
1152 T}
1153 T{
1154 "enabled\-runtime"
1155 T}::
1156 T{
1157 "linked"
1158 T}:T{
1159 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\&.
1160 T}:T{
1161 > 0
1162 T}
1163 T{
1164 "linked\-runtime"
1165 T}::
1166 T{
1167 "alias"
1168 T}:T{
1169 The name is an alias (symlink to another unit file)\&.
1170 T}:T{
1171 0
1172 T}
1173 T{
1174 "masked"
1175 T}:T{
1176 Completely disabled, so that any start operation on it fails (permanently in /etc/systemd/system/ or transiently in /run/systemd/systemd/)\&.
1177 T}:T{
1178 > 0
1179 T}
1180 T{
1181 "masked\-runtime"
1182 T}::
1183 T{
1184 "static"
1185 T}:T{
1186 The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section\&.
1187 T}:T{
1188 0
1189 T}
1190 T{
1191 "indirect"
1192 T}:T{
1193 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\&.
1194 T}:T{
1195 0
1196 T}
1197 T{
1198 "disabled"
1199 T}:T{
1200 The unit file is not enabled, but contains an [Install] section with installation instructions\&.
1201 T}:T{
1202 > 0
1203 T}
1204 T{
1205 "generated"
1206 T}:T{
1207 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\&.
1208 T}:T{
1209 0
1210 T}
1211 T{
1212 "transient"
1213 T}:T{
1214 The unit file has been created dynamically with the runtime API\&. Transient units may not be enabled\&.
1215 T}:T{
1216 0
1217 T}
1218 T{
1219 "bad"
1220 T}:T{
1221 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\&.
1222 T}:T{
1223 > 0
1224 T}
1225 T{
1226 "not\-found"
1227 T}:T{
1228 The unit file does not exist\&.
1229 T}:T{
1230 4
1231 T}
1232 .TE
1233 .sp 1
1234 Added in version 238\&.
1235 .RE
1236 .PP
1237 \fBmask \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1238 .RS 4
1239 Mask one or more units, as specified on the command line\&. This will link these unit files to
1240 /dev/null, making it impossible to start them\&. This is a stronger version of
1241 \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
1242 \fB\-\-runtime\fR
1243 option to only mask temporarily until the next reboot of the system\&. The
1244 \fB\-\-now\fR
1245 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\&.
1246 .sp
1247 Note that this will create a symlink under the unit\*(Aqs name in
1248 /etc/systemd/system/
1249 (in case
1250 \fB\-\-runtime\fR
1251 is not specified) or
1252 /run/systemd/system/
1253 (in case
1254 \fB\-\-runtime\fR
1255 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
1256 /usr/lib/systemd/system/
1257 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
1258 \fB\-\-user\fR
1259 mode, in which case the directories are below the user\*(Aqs home directory however\&.
1260 .sp
1261 If a unit gets masked but its triggering units are still active, a warning containing the names of the triggering units is shown\&.
1262 \fB\-\-no\-warn\fR
1263 can be used to suppress the warning\&.
1264 .sp
1265 Added in version 238\&.
1266 .RE
1267 .PP
1268 \fBunmask \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1269 .RS 4
1270 Unmask one or more unit files, as specified on the command line\&. This will undo the effect of
1271 \fBmask\fR\&. This command expects valid unit names only, it does not accept unit file paths\&.
1272 .sp
1273 Added in version 238\&.
1274 .RE
1275 .PP
1276 \fBlink \fR\fB\fIPATH\fR\fR\fB\&...\fR
1277 .RS 4
1278 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
1279 \fBdisable\fR\&. The effect of this command is that a unit file is made available for commands such as
1280 \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
1281 /home/
1282 or
1283 /var/
1284 is not allowed, unless those directories are located on the root file system)\&.
1285 .sp
1286 Added in version 233\&.
1287 .RE
1288 .PP
1289 \fBrevert \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1290 .RS 4
1291 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
1292 "foo\&.service"
1293 the matching directories
1294 "foo\&.service\&.d/"
1295 with all their contained files are removed, both below the persistent and runtime configuration directories (i\&.e\&. below
1296 /etc/systemd/system
1297 and
1298 /run/systemd/system); if the unit file has a vendor\-supplied version (i\&.e\&. a unit file located below
1299 /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
1300 /etc/systemd/system
1301 or
1302 /run/systemd/system, but not in a unit file stored below
1303 /usr/), then it is not removed\&. Also, if a unit is masked, it is unmasked\&.
1304 .sp
1305 Effectively, this command may be used to undo all changes made with
1306 \fBsystemctl edit\fR,
1307 \fBsystemctl set\-property\fR
1308 and
1309 \fBsystemctl mask\fR
1310 and puts the original unit file with its settings back in effect\&.
1311 .sp
1312 Added in version 230\&.
1313 .RE
1314 .PP
1315 \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
1316 .RS 4
1317 Adds
1318 "Wants="
1319 or
1320 "Requires="
1321 dependencies, respectively, to the specified
1322 \fITARGET\fR
1323 for one or more units\&.
1324 .sp
1325 This command honors
1326 \fB\-\-system\fR,
1327 \fB\-\-user\fR,
1328 \fB\-\-runtime\fR
1329 and
1330 \fB\-\-global\fR
1331 in a way similar to
1332 \fBenable\fR\&.
1333 .sp
1334 Added in version 217\&.
1335 .RE
1336 .PP
1337 \fBedit \fR\fB\fIUNIT\fR\fR\fB\&...\fR
1338 .RS 4
1339 Edit or replace a drop\-in snippet or the main unit file, to extend or override the definition of the specified unit\&.
1340 .sp
1341 Depending on whether
1342 \fB\-\-system\fR
1343 (the default),
1344 \fB\-\-user\fR, or
1345 \fB\-\-global\fR
1346 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\&.
1347 .sp
1348 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
1349 \fBsystemctl daemon\-reload \-\-system\fR
1350 or
1351 \fBsystemctl daemon\-reload \-\-user\fR\&. For
1352 \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)\&.
1353 .sp
1354 If
1355 \fB\-\-full\fR
1356 is specified, a replacement for the main unit file will be created or edited\&. Otherwise, a drop\-in file will be created or edited\&.
1357 .sp
1358 If
1359 \fB\-\-drop\-in=\fR
1360 is specified, the given drop\-in file name will be used instead of the default
1361 override\&.conf\&.
1362 .sp
1363 The unit must exist, i\&.e\&. its main unit file must be present\&. If
1364 \fB\-\-force\fR
1365 is specified, this requirement is ignored and a new unit may be created (with
1366 \fB\-\-full\fR), or a drop\-in for a nonexistent unit may be created\&.
1367 .sp
1368 If
1369 \fB\-\-runtime\fR
1370 is specified, the changes will be made temporarily in
1371 /run/
1372 and they will be lost on the next reboot\&.
1373 .sp
1374 If
1375 \fB\-\-stdin\fR
1376 is specified, the new contents will be read from standard input\&. In this mode, the old contents of the file are discarded\&.
1377 .sp
1378 If the temporary file is empty upon exit, the modification of the related unit is canceled\&.
1379 .sp
1380 Note that this command cannot be used to remotely edit units and that you cannot temporarily edit units which are in
1381 /etc/, since they take precedence over
1382 /run/\&.
1383 .sp
1384 Added in version 218\&.
1385 .RE
1386 .PP
1387 \fBget\-default\fR
1388 .RS 4
1389 Return the default target to boot into\&. This returns the target unit name
1390 default\&.target
1391 is aliased (symlinked) to\&.
1392 .sp
1393 Added in version 205\&.
1394 .RE
1395 .PP
1396 \fBset\-default \fR\fB\fITARGET\fR\fR
1397 .RS 4
1398 Set the default target to boot into\&. This sets (symlinks) the
1399 default\&.target
1400 alias to the given target unit\&.
1401 .sp
1402 Added in version 205\&.
1403 .RE
1404 .SS "Machine Commands"
1405 .PP
1406 \fBlist\-machines\fR [\fIPATTERN\fR\&...]
1407 .RS 4
1408 List the host and all running local containers with their state\&. If one or more
1409 \fIPATTERN\fRs are specified, only containers matching one of them are shown\&.
1410 .sp
1411 Added in version 212\&.
1412 .RE
1413 .SS "Job Commands"
1414 .PP
1415 \fBlist\-jobs \fR\fB[\fIPATTERN\&...\fR]\fR
1416 .RS 4
1417 List jobs that are in progress\&. If one or more
1418 \fIPATTERN\fRs are specified, only jobs for units matching one of them are shown\&.
1419 .sp
1420 When combined with
1421 \fB\-\-after\fR
1422 or
1423 \fB\-\-before\fR
1424 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\&.
1425 .sp
1426 Added in version 233\&.
1427 .RE
1428 .PP
1429 \fBcancel \fR\fB[\fIJOB\fR\&...]\fR
1430 .RS 4
1431 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\&.
1432 .sp
1433 Added in version 233\&.
1434 .RE
1435 .SS "Environment Commands"
1436 .PP
1437 \fBsystemd\fR
1438 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),
1439 \fIare\fR
1440 valid ASCII and thus valid UTF\-8)\&. The total length of the environment block is limited to
1441 \fB_SC_ARG_MAX\fR
1442 value defined by
1443 \fBsysconf\fR(3)\&.
1444 .PP
1445 \fBshow\-environment\fR
1446 .RS 4
1447 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
1448 "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
1449 "VARIABLE=$\*(Aqvalue\*(Aq"\&. This syntax is known to be supported by
1450 \fBbash\fR(1),
1451 \fBzsh\fR(1),
1452 \fBksh\fR(1), and
1453 \fBbusybox\fR(1)\*(Aqs
1454 \fBash\fR(1), but not
1455 \fBdash\fR(1)
1456 or
1457 \fBfish\fR(1)\&.
1458 .sp
1459 Note that this shows the
1460 \fIeffective\fR
1461 block, i\&.e\&. the combination of environment variables configured via configuration files, environment generators and via IPC (i\&.e\&. via the
1462 \fBset\-environment\fR
1463 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\&.
1464 .RE
1465 .PP
1466 \fBset\-environment \fR\fB\fIVARIABLE=VALUE\fR\fR\fB\&...\fR
1467 .RS 4
1468 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\&.
1469 .sp
1470 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
1471 \fBshow\-environment\fR
1472 verb will show the combination of the blocks, see above\&.
1473 .sp
1474 Added in version 233\&.
1475 .RE
1476 .PP
1477 \fBunset\-environment \fR\fB\fIVARIABLE\fR\fR\fB\&...\fR
1478 .RS 4
1479 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\&.
1480 .sp
1481 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
1482 \fBshow\-environment\fR
1483 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\&.
1484 .sp
1485 Added in version 233\&.
1486 .RE
1487 .PP
1488 \fBimport\-environment\fR \fIVARIABLE\&...\fR
1489 .RS 4
1490 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
1491 \fBsystemctl\fR
1492 process is imported\&. In this mode, any inherited invalid environment variables are quietly ignored\&.
1493 .sp
1494 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\&.
1495 .sp
1496 Added in version 209\&.
1497 .RE
1498 .SS "Manager State Commands"
1499 .PP
1500 \fBdaemon\-reload\fR
1501 .RS 4
1502 Reload the systemd manager configuration\&. This will rerun all generators (see
1503 \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\&.
1504 .sp
1505 This command should not be confused with the
1506 \fBreload\fR
1507 command\&.
1508 .RE
1509 .PP
1510 \fBdaemon\-reexec\fR
1511 .RS 4
1512 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
1513 \fBdaemon\-reload\fR\&. While the daemon is being reexecuted, all sockets systemd listening on behalf of user configuration will stay accessible\&.
1514 .RE
1515 .PP
1516 \fBlog\-level\fR [\fILEVEL\fR]
1517 .RS 4
1518 If no argument is given, print the current log level of the manager\&. If an optional argument
1519 \fILEVEL\fR
1520 is provided, then the command changes the current log level of the manager to
1521 \fILEVEL\fR
1522 (accepts the same values as
1523 \fB\-\-log\-level=\fR
1524 described in
1525 \fBsystemd\fR(1))\&.
1526 .sp
1527 Added in version 244\&.
1528 .RE
1529 .PP
1530 \fBlog\-target\fR [\fITARGET\fR]
1531 .RS 4
1532 If no argument is given, print the current log target of the manager\&. If an optional argument
1533 \fITARGET\fR
1534 is provided, then the command changes the current log target of the manager to
1535 \fITARGET\fR
1536 (accepts the same values as
1537 \fB\-\-log\-target=\fR, described in
1538 \fBsystemd\fR(1))\&.
1539 .sp
1540 Added in version 244\&.
1541 .RE
1542 .PP
1543 \fBservice\-watchdogs\fR [yes|no]
1544 .RS 4
1545 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\&.
1546 \fBOnFailure=\fR
1547 or
1548 \fBStartLimitAction=\fR); see
1549 \fBsystemd.service\fR(5)\&. The hardware watchdog is not affected by this setting\&.
1550 .sp
1551 Added in version 244\&.
1552 .RE
1553 .SS "System Commands"
1554 .PP
1555 \fBis\-system\-running\fR
1556 .RS 4
1557 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
1558 \fB\-\-quiet\fR
1559 to suppress this output\&.
1560 .sp
1561 Use
1562 \fB\-\-wait\fR
1563 to wait until the boot process is completed before printing the current state and returning the appropriate error status\&. If
1564 \fB\-\-wait\fR
1565 is in use, states
1566 \fIinitializing\fR
1567 or
1568 \fIstarting\fR
1569 will not be reported, instead the command will block until a later state (such as
1570 \fIrunning\fR
1571 or
1572 \fIdegraded\fR) is reached\&.
1573 .sp
1574 .it 1 an-trap
1575 .nr an-no-space-flag 1
1576 .nr an-break-flag 1
1577 .br
1578 .B Table\ \&4.\ \&is\-system\-running output
1579 .TS
1580 allbox tab(:);
1581 lB lB lB.
1582 T{
1583 Name
1584 T}:T{
1585 Description
1586 T}:T{
1587 Exit Code
1588 T}
1589 .T&
1590 l l l
1591 l l l
1592 l l l
1593 l l l
1594 l l l
1595 l l l
1596 l l l
1597 l l l.
1598 T{
1599 \fIinitializing\fR
1600 T}:T{
1601 Early bootup, before
1602 basic\&.target
1603 is reached or the
1604 \fImaintenance\fR
1605 state entered\&.
1606 T}:T{
1607 > 0
1608 T}
1609 T{
1610 \fIstarting\fR
1611 T}:T{
1612 Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached\&.
1613 T}:T{
1614 > 0
1615 T}
1616 T{
1617 \fIrunning\fR
1618 T}:T{
1619 The system is fully operational\&.
1620 T}:T{
1621 0
1622 T}
1623 T{
1624 \fIdegraded\fR
1625 T}:T{
1626 The system is operational but one or more units failed\&.
1627 T}:T{
1628 > 0
1629 T}
1630 T{
1631 \fImaintenance\fR
1632 T}:T{
1633 The rescue or emergency target is active\&.
1634 T}:T{
1635 > 0
1636 T}
1637 T{
1638 \fIstopping\fR
1639 T}:T{
1640 The manager is shutting down\&.
1641 T}:T{
1642 > 0
1643 T}
1644 T{
1645 \fIoffline\fR
1646 T}:T{
1647 The manager is not running\&. Specifically, this is the operational state if an incompatible program is running as system manager (PID 1)\&.
1648 T}:T{
1649 > 0
1650 T}
1651 T{
1652 \fIunknown\fR
1653 T}:T{
1654 The operational state could not be determined, due to lack of resources or another error cause\&.
1655 T}:T{
1656 > 0
1657 T}
1658 .TE
1659 .sp 1
1660 Added in version 215\&.
1661 .RE
1662 .PP
1663 \fBdefault\fR
1664 .RS 4
1665 Enter default mode\&. This is equivalent to
1666 \fBsystemctl isolate default\&.target\fR\&. This operation is blocking by default, use
1667 \fB\-\-no\-block\fR
1668 to request asynchronous behavior\&.
1669 .RE
1670 .PP
1671 \fBrescue\fR
1672 .RS 4
1673 Enter rescue mode\&. This is equivalent to
1674 \fBsystemctl isolate rescue\&.target\fR\&. This operation is blocking by default, use
1675 \fB\-\-no\-block\fR
1676 to request asynchronous behavior\&.
1677 .RE
1678 .PP
1679 \fBemergency\fR
1680 .RS 4
1681 Enter emergency mode\&. This is equivalent to
1682 \fBsystemctl isolate emergency\&.target\fR\&. This operation is blocking by default, use
1683 \fB\-\-no\-block\fR
1684 to request asynchronous behavior\&.
1685 .RE
1686 .PP
1687 \fBhalt\fR
1688 .RS 4
1689 Shut down and halt the system\&. This is mostly equivalent to
1690 \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
1691 \fBsystemctl poweroff\fR
1692 for powering off the system (see below)\&.
1693 .sp
1694 If combined with
1695 \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
1696 \fB\-\-force\fR
1697 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
1698 \fB\-\-force\fR
1699 is specified twice the halt operation is executed by
1700 \fBsystemctl\fR
1701 itself, and the system manager is not contacted\&. This means the command should succeed even when the system manager has crashed\&.
1702 .sp
1703 If combined with
1704 \fB\-\-when=\fR, shutdown will be scheduled after the given timestamp\&. And
1705 \fB\-\-when=cancel\fR
1706 will cancel the shutdown\&.
1707 .RE
1708 .PP
1709 \fBpoweroff\fR
1710 .RS 4
1711 Shut down and power\-off the system\&. This is mostly equivalent to
1712 \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\&.
1713 .sp
1714 This command honors
1715 \fB\-\-force\fR
1716 and
1717 \fB\-\-when=\fR
1718 in a similar way as
1719 \fBhalt\fR\&.
1720 .RE
1721 .PP
1722 \fBreboot\fR
1723 .RS 4
1724 Shut down and reboot the system\&.
1725 .sp
1726 This command is mostly equivalent to
1727 \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\&.
1728 .sp
1729 If the switch
1730 \fB\-\-reboot\-argument=\fR
1731 is given, it will be passed as the optional argument to the
1732 \fBreboot\fR(2)
1733 system call\&.
1734 .sp
1735 Options
1736 \fB\-\-boot\-loader\-entry=\fR,
1737 \fB\-\-boot\-loader\-menu=\fR, and
1738 \fB\-\-firmware\-setup\fR
1739 can be used to select what to do
1740 \fIafter\fR
1741 the reboot\&. See the descriptions of those options for details\&.
1742 .sp
1743 This command honors
1744 \fB\-\-force\fR
1745 and
1746 \fB\-\-when=\fR
1747 in a similar way as
1748 \fBhalt\fR\&.
1749 .sp
1750 If a new kernel has been loaded via
1751 \fBkexec \-\-load\fR, a
1752 \fBkexec\fR
1753 will be performed instead of a reboot, unless
1754 "SYSTEMCTL_SKIP_AUTO_KEXEC=1"
1755 has been set\&. If a new root file system has been set up on
1756 "/run/nextroot/", a
1757 \fBsoft\-reboot\fR
1758 will be performed instead of a reboot, unless
1759 "SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1"
1760 has been set\&.
1761 .sp
1762 Added in version 246\&.
1763 .RE
1764 .PP
1765 \fBkexec\fR
1766 .RS 4
1767 Shut down and reboot the system via
1768 \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
1769 \fB\-\-force\fR
1770 can be used to continue without a kexec kernel, i\&.e\&. to perform a normal reboot\&. The final reboot step is equivalent to
1771 \fBsystemctl start kexec\&.target \-\-job\-mode=replace\-irreversibly \-\-no\-block\fR\&.
1772 .sp
1773 To load a kernel, an enumeration is performed following the
1774 \m[blue]\fBUAPI\&.1 Boot 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\&.
1775 \fBbootctl list\fR
1776 may be used to list boot entries, see
1777 \fBbootctl\fR(1)\&.
1778 .sp
1779 This command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete\&.
1780 .sp
1781 This command honors
1782 \fB\-\-force\fR
1783 and
1784 \fB\-\-when=\fR
1785 similarly to
1786 \fBhalt\fR\&.
1787 .sp
1788 If a new kernel has been loaded via
1789 \fBkexec \-\-load\fR, a
1790 \fBkexec\fR
1791 will be performed when
1792 \fBreboot\fR
1793 is invoked, unless
1794 "SYSTEMCTL_SKIP_AUTO_KEXEC=1"
1795 has been set\&.
1796 .RE
1797 .PP
1798 \fBsoft\-reboot\fR
1799 .RS 4
1800 Shut down and reboot userspace\&. This is equivalent to
1801 \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\&.
1802 .sp
1803 This command honors
1804 \fB\-\-force\fR
1805 and
1806 \fB\-\-when=\fR
1807 in a similar way as
1808 \fBhalt\fR\&.
1809 .sp
1810 This operation only reboots userspace, leaving the kernel running\&. See
1811 \fBsystemd-soft-reboot.service\fR(8)
1812 for details\&.
1813 .sp
1814 If a new root file system has been set up on
1815 "/run/nextroot/", a
1816 \fBsoft\-reboot\fR
1817 will be performed when
1818 \fBreboot\fR
1819 is invoked, unless
1820 "SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1"
1821 has been set\&.
1822 .sp
1823 Added in version 254\&.
1824 .RE
1825 .PP
1826 \fBexit\fR [\fIEXIT_CODE\fR]
1827 .RS 4
1828 Ask the service manager to quit\&. This is only supported for user service managers (i\&.e\&. in conjunction with the
1829 \fB\-\-user\fR
1830 option) or in containers and is equivalent to
1831 \fBpoweroff\fR
1832 otherwise\&. This command is asynchronous; it will return after the exit operation is enqueued, without waiting for it to complete\&.
1833 .sp
1834 The service manager will exit with the specified exit code, if
1835 \fIEXIT_CODE\fR
1836 is passed\&.
1837 .sp
1838 Added in version 227\&.
1839 .RE
1840 .PP
1841 \fBswitch\-root\fR [\fIROOT\fR [\fIINIT\fR]]
1842 .RS 4
1843 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
1844 /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\&.
1845 .sp
1846 Added in version 209\&.
1847 .RE
1848 .PP
1849 \fBsleep\fR
1850 .RS 4
1851 Put the system to sleep, through
1852 \fBsuspend\fR,
1853 \fBhibernate\fR,
1854 \fBhybrid\-sleep\fR, or
1855 \fBsuspend\-then\-hibernate\fR\&. The sleep operation to use is automatically selected by
1856 \fBsystemd-logind.service\fR(8)\&. By default,
1857 \fBsuspend\-then\-hibernate\fR
1858 is used, and falls back to
1859 \fBsuspend\fR
1860 and then
1861 \fBhibernate\fR
1862 if not supported\&. Refer to
1863 \fISleepOperation=\fR
1864 setting in
1865 \fBlogind.conf\fR(5)
1866 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\&.
1867 .sp
1868 Added in version 256\&.
1869 .RE
1870 .PP
1871 \fBsuspend\fR
1872 .RS 4
1873 Suspend the system\&. This will trigger activation of the special target unit
1874 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\&.
1875 .sp
1876 If
1877 \fB\-\-force\fR
1878 is specified, and
1879 \fBsystemd\-logind\fR
1880 returned error for the operation, the error will be ignored and the operation will be tried again directly through starting the target unit\&.
1881 .RE
1882 .PP
1883 \fBhibernate\fR
1884 .RS 4
1885 Hibernate the system\&. This will trigger activation of the special target unit
1886 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\&.
1887 .sp
1888 This command honors
1889 \fB\-\-force\fR
1890 in the same way as
1891 \fBsuspend\fR\&.
1892 .RE
1893 .PP
1894 \fBhybrid\-sleep\fR
1895 .RS 4
1896 Hibernate and suspend the system\&. This will trigger activation of the special target unit
1897 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\&.
1898 .sp
1899 This command honors
1900 \fB\-\-force\fR
1901 in the same way as
1902 \fBsuspend\fR\&.
1903 .sp
1904 Added in version 196\&.
1905 .RE
1906 .PP
1907 \fBsuspend\-then\-hibernate\fR
1908 .RS 4
1909 Suspend the system and hibernate it when the battery is low, or when the delay specified in
1910 systemd\-sleep\&.conf
1911 elapsed\&. This will trigger activation of the special target unit
1912 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\&.
1913 .sp
1914 This command honors
1915 \fB\-\-force\fR
1916 in the same way as
1917 \fBsuspend\fR\&.
1918 .sp
1919 Added in version 240\&.
1920 .RE
1921 .SS "Parameter Syntax"
1922 .PP
1923 Unit commands listed above take either a single unit name (designated as
1924 \fIUNIT\fR), or multiple unit specifications (designated as
1925 \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,
1926 "\&.service"
1927 by default, and a type\-specific suffix in case of commands which operate only on specific unit types\&. For example,
1928 .sp
1929 .if n \{\
1930 .RS 4
1931 .\}
1932 .nf
1933 # systemctl start sshd
1934 .fi
1935 .if n \{\
1936 .RE
1937 .\}
1938 .sp
1939 and
1940 .sp
1941 .if n \{\
1942 .RS 4
1943 .\}
1944 .nf
1945 # systemctl start sshd\&.service
1946 .fi
1947 .if n \{\
1948 .RE
1949 .\}
1950 .sp
1951 are equivalent, as are
1952 .sp
1953 .if n \{\
1954 .RS 4
1955 .\}
1956 .nf
1957 # systemctl isolate default
1958 .fi
1959 .if n \{\
1960 .RE
1961 .\}
1962 .sp
1963 and
1964 .sp
1965 .if n \{\
1966 .RS 4
1967 .\}
1968 .nf
1969 # systemctl isolate default\&.target
1970 .fi
1971 .if n \{\
1972 .RE
1973 .\}
1974 .sp
1975 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute) paths to mount unit names\&.
1976 .sp
1977 .if n \{\
1978 .RS 4
1979 .\}
1980 .nf
1981 # systemctl status /dev/sda
1982 # systemctl status /home
1983 .fi
1984 .if n \{\
1985 .RE
1986 .\}
1987 .sp
1988 are equivalent to:
1989 .sp
1990 .if n \{\
1991 .RS 4
1992 .\}
1993 .nf
1994 # systemctl status dev\-sda\&.device
1995 # systemctl status home\&.mount
1996 .fi
1997 .if n \{\
1998 .RE
1999 .\}
2000 .sp
2001 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\&.
2002 .PP
2003 Glob patterns use
2004 \fBfnmatch\fR(3), so normal shell\-style globbing rules are used, and
2005 "*",
2006 "?",
2007 "[]"
2008 may be used\&. See
2009 \fBglob\fR(7)
2010 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:
2011 .sp
2012 .if n \{\
2013 .RS 4
2014 .\}
2015 .nf
2016 # systemctl stop "sshd@*\&.service"
2017 .fi
2018 .if n \{\
2019 .RE
2020 .\}
2021 .sp
2022 will stop all
2023 sshd@\&.service
2024 instances\&. Note that alias names of units, and units that are not in memory are not considered for glob expansion\&.
2025 .PP
2026 For unit file commands, the specified
2027 \fIUNIT\fR
2028 should be the name of the unit file (possibly abbreviated, see above), or the absolute path to the unit file:
2029 .sp
2030 .if n \{\
2031 .RS 4
2032 .\}
2033 .nf
2034 # systemctl enable foo\&.service
2035 .fi
2036 .if n \{\
2037 .RE
2038 .\}
2039 .sp
2040 or
2041 .sp
2042 .if n \{\
2043 .RS 4
2044 .\}
2045 .nf
2046 # systemctl link /path/to/foo\&.service
2047 .fi
2048 .if n \{\
2049 .RE
2050 .\}
2051 .sp
2052 .SH "OPTIONS"
2053 .PP
2054 The following options are understood:
2055 .PP
2056 \fB\-t\fR, \fB\-\-type=\fR
2057 .RS 4
2058 The argument is a comma\-separated list of unit types such as
2059 \fBservice\fR
2060 and
2061 \fBsocket\fR\&. When units are listed with
2062 \fBlist\-units\fR,
2063 \fBlist\-dependencies\fR,
2064 \fBshow\fR, or
2065 \fBstatus\fR, only units of the specified types will be shown\&. By default, units of all types are shown\&. Use
2066 \fB\-\-type=\fR
2067 to reset the filter\&.
2068 .sp
2069 As a special case, if one of the arguments is
2070 \fBhelp\fR, a list of allowed values will be printed and the program will exit\&.
2071 .RE
2072 .PP
2073 \fB\-\-state=\fR
2074 .RS 4
2075 The argument is a comma\-separated list of unit LOAD, SUB, or ACTIVE states\&. When listing units with
2076 \fBlist\-units\fR,
2077 \fBlist\-dependencies\fR,
2078 \fBshow\fR
2079 or
2080 \fBstatus\fR, show only those in the specified states\&. Use
2081 \fB\-\-state=failed\fR
2082 or
2083 \fB\-\-failed\fR
2084 to show only failed units\&. Use
2085 \fB\-\-state=\fR
2086 to reset the filter\&.
2087 .sp
2088 As a special case, if one of the arguments is
2089 \fBhelp\fR, a list of allowed values will be printed and the program will exit\&.
2090 .sp
2091 Added in version 206\&.
2092 .RE
2093 .PP
2094 \fB\-p\fR, \fB\-\-property=\fR
2095 .RS 4
2096 When showing unit/job/manager properties with the
2097 \fBshow\fR
2098 command, limit display to properties specified in the argument\&. The argument should be a comma\-separated list of property names, such as
2099 "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\&.
2100 .sp
2101 For the manager itself,
2102 \fBsystemctl\ \&show\fR
2103 will show all available properties, most of which are derived or closely match the options described in
2104 \fBsystemd-system.conf\fR(5)\&.
2105 .sp
2106 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
2107 \fBsystemd.unit\fR(5), and the pages for individual unit types
2108 \fBsystemd.service\fR(5),
2109 \fBsystemd.socket\fR(5), etc\&.
2110 .RE
2111 .PP
2112 \fB\-P\fR
2113 .RS 4
2114 Equivalent to
2115 \fB\-\-value\fR
2116 \fB\-\-property=\fR, i\&.e\&. shows the value of the property without the property name or
2117 "="\&. Note that using
2118 \fB\-P\fR
2119 once will also affect all properties listed with
2120 \fB\-p\fR/\fB\-\-property=\fR\&.
2121 .sp
2122 Added in version 246\&.
2123 .RE
2124 .PP
2125 \fB\-a\fR, \fB\-\-all\fR
2126 .RS 4
2127 When listing units with
2128 \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\&.
2129 .sp
2130 To list all units installed in the file system, use the
2131 \fBlist\-unit\-files\fR
2132 command instead\&.
2133 .sp
2134 When listing units with
2135 \fBlist\-dependencies\fR, recursively show dependencies of all dependent units (by default only dependencies of target units are shown)\&.
2136 .sp
2137 When used with
2138 \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\&.)
2139 .RE
2140 .PP
2141 \fB\-r\fR, \fB\-\-recursive\fR
2142 .RS 4
2143 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 (":")\&.
2144 .sp
2145 Added in version 212\&.
2146 .RE
2147 .PP
2148 \fB\-\-reverse\fR
2149 .RS 4
2150 Show reverse dependencies between units with
2151 \fBlist\-dependencies\fR, i\&.e\&. follow dependencies of type
2152 \fIWantedBy=\fR,
2153 \fIRequiredBy=\fR,
2154 \fIUpheldBy=\fR,
2155 \fIPartOf=\fR,
2156 \fIBoundBy=\fR, instead of
2157 \fIWants=\fR
2158 and similar\&.
2159 .sp
2160 Added in version 203\&.
2161 .RE
2162 .PP
2163 \fB\-\-after\fR
2164 .RS 4
2165 With
2166 \fBlist\-dependencies\fR, show the units that are ordered before the specified unit\&. In other words, recursively list units following the
2167 \fIAfter=\fR
2168 dependency\&.
2169 .sp
2170 Note that any
2171 \fIAfter=\fR
2172 dependency is automatically mirrored to create a
2173 \fIBefore=\fR
2174 dependency\&. Temporal dependencies may be specified explicitly, but are also created implicitly for units which are
2175 \fIWantedBy=\fR
2176 targets (see
2177 \fBsystemd.target\fR(5)), and as a result of other directives (for example
2178 \fIRequiresMountsFor=\fR)\&. Both explicitly and implicitly introduced dependencies are shown with
2179 \fBlist\-dependencies\fR\&.
2180 .sp
2181 When passed to the
2182 \fBlist\-jobs\fR
2183 command, for each printed job show which other jobs are waiting for it\&. May be combined with
2184 \fB\-\-before\fR
2185 to show both the jobs waiting for each job as well as all jobs each job is waiting for\&.
2186 .sp
2187 Added in version 203\&.
2188 .RE
2189 .PP
2190 \fB\-\-before\fR
2191 .RS 4
2192 With
2193 \fBlist\-dependencies\fR, show the units that are ordered after the specified unit\&. In other words, recursively list units following the
2194 \fIBefore=\fR
2195 dependency\&.
2196 .sp
2197 When passed to the
2198 \fBlist\-jobs\fR
2199 command, for each printed job show which other jobs it is waiting for\&. May be combined with
2200 \fB\-\-after\fR
2201 to show both the jobs waiting for each job as well as all jobs each job is waiting for\&.
2202 .sp
2203 Added in version 212\&.
2204 .RE
2205 .PP
2206 \fB\-\-with\-dependencies\fR
2207 .RS 4
2208 When used with
2209 \fBstatus\fR,
2210 \fBcat\fR,
2211 \fBlist\-units\fR, and
2212 \fBlist\-unit\-files\fR, those commands print all specified units and the dependencies of those units\&.
2213 .sp
2214 Options
2215 \fB\-\-reverse\fR,
2216 \fB\-\-after\fR,
2217 \fB\-\-before\fR
2218 may be used to change what types of dependencies are shown\&.
2219 .sp
2220 Added in version 245\&.
2221 .RE
2222 .PP
2223 \fB\-l\fR, \fB\-\-full\fR
2224 .RS 4
2225 Do not ellipsize unit names, process tree entries, journal output, or truncate unit descriptions in the output of
2226 \fBstatus\fR,
2227 \fBlist\-units\fR,
2228 \fBlist\-jobs\fR, and
2229 \fBlist\-timers\fR\&.
2230 .sp
2231 Also, show installation targets in the output of
2232 \fBis\-enabled\fR\&.
2233 .RE
2234 .PP
2235 \fB\-\-value\fR
2236 .RS 4
2237 When printing properties with
2238 \fBshow\fR, only print the value, and skip the property name and
2239 "="\&. Also see option
2240 \fB\-P\fR
2241 above\&.
2242 .sp
2243 Added in version 230\&.
2244 .RE
2245 .PP
2246 \fB\-\-show\-types\fR
2247 .RS 4
2248 When showing sockets, show the type of the socket\&.
2249 .sp
2250 Added in version 202\&.
2251 .RE
2252 .PP
2253 \fB\-\-job\-mode=\fR
2254 .RS 4
2255 When queuing a new job, this option controls how to deal with already queued jobs\&. It takes one of
2256 "fail",
2257 "lenient",
2258 "replace",
2259 "replace\-irreversibly",
2260 "isolate",
2261 "ignore\-dependencies",
2262 "ignore\-requirements",
2263 "flush",
2264 "triggering", or
2265 "restart\-dependencies"\&. Defaults to
2266 "replace", except when the
2267 \fBisolate\fR
2268 command is used which implies the
2269 "isolate"
2270 job mode\&.
2271 .sp
2272 If
2273 "fail"
2274 is specified and a requested operation on weak dependencies 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\&.
2275 .sp
2276 If
2277 "lenient"
2278 is specified and a requested operation conflicts with any active/activating unit, cause the operation to fail\&.
2279 .sp
2280 If
2281 "replace"
2282 (the default) is specified, any conflicting pending job will be replaced, as necessary\&.
2283 .sp
2284 If
2285 "replace\-irreversibly"
2286 is specified, operate like
2287 "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
2288 \fBcancel\fR
2289 command\&. This job mode should be used on any transaction which pulls in
2290 shutdown\&.target\&.
2291 .sp
2292 "isolate"
2293 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
2294 \fBisolate\fR
2295 command is used\&.
2296 .sp
2297 "flush"
2298 will cause all queued jobs to be canceled when the new job is enqueued\&.
2299 .sp
2300 If
2301 "ignore\-dependencies"
2302 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\&.
2303 .sp
2304 "ignore\-requirements"
2305 is similar to
2306 "ignore\-dependencies", but only causes the requirement dependencies to be ignored, the ordering dependencies will still be honored\&.
2307 .sp
2308 "triggering"
2309 may only be used with
2310 \fBsystemctl stop\fR\&. In this mode, the specified unit and any active units that trigger it are stopped\&. See the discussion of
2311 \fITriggers=\fR
2312 in
2313 \fBsystemd.unit\fR(5)
2314 for more information about triggering units\&.
2315 .sp
2316 "restart\-dependencies"
2317 may only be used with
2318 \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\&.
2319 .sp
2320 Added in version 209\&.
2321 .RE
2322 .PP
2323 \fB\-T\fR, \fB\-\-show\-transaction\fR
2324 .RS 4
2325 When enqueuing a unit job (for example as effect of a
2326 \fBsystemctl start\fR
2327 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\&.
2328 .sp
2329 Added in version 242\&.
2330 .RE
2331 .PP
2332 \fB\-\-fail\fR
2333 .RS 4
2334 Shorthand for
2335 \fB\-\-job\-mode=\fRfail\&.
2336 .sp
2337 When used with the
2338 \fBkill\fR
2339 command, if no units were killed, the operation results in an error\&.
2340 .sp
2341 Added in version 227\&.
2342 .RE
2343 .PP
2344 \fB\-\-check\-inhibitors=\fR
2345 .RS 4
2346 When system shutdown or sleep state is requested, this option controls checking of inhibitor locks\&. It takes one of
2347 "auto",
2348 "yes", and
2349 "no"\&. Defaults to
2350 "auto", which means logind will perform the check and respect active inhibitor locks, but
2351 \fBsystemctl\fR
2352 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\&.
2353 "no"
2354 disables the checks both in
2355 \fBsystemctl\fR
2356 and
2357 \fBsystemd-logind\fR(8)\&.
2358 .sp
2359 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
2360 "no")\&.
2361 .sp
2362 Option
2363 \fB\-\-force\fR
2364 provides another way to override inhibitors\&.
2365 .sp
2366 Added in version 248\&.
2367 .RE
2368 .PP
2369 \fB\-i\fR
2370 .RS 4
2371 Shortcut for
2372 \fB\-\-check\-inhibitors=no\fR\&.
2373 .sp
2374 Added in version 198\&.
2375 .RE
2376 .PP
2377 \fB\-\-dry\-run\fR
2378 .RS 4
2379 Just print what would be done\&. Currently supported by verbs
2380 \fBhalt\fR,
2381 \fBpoweroff\fR,
2382 \fBreboot\fR,
2383 \fBkexec\fR,
2384 \fBsuspend\fR,
2385 \fBhibernate\fR,
2386 \fBhybrid\-sleep\fR,
2387 \fBsuspend\-then\-hibernate\fR,
2388 \fBdefault\fR,
2389 \fBrescue\fR,
2390 \fBemergency\fR, and
2391 \fBexit\fR\&.
2392 .sp
2393 Added in version 236\&.
2394 .RE
2395 .PP
2396 \fB\-q\fR, \fB\-\-quiet\fR
2397 .RS 4
2398 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
2399 \fBshow\fR)\&. Errors are always printed\&.
2400 .RE
2401 .PP
2402 \fB\-v\fR, \fB\-\-verbose\fR
2403 .RS 4
2404 Display unit log output while executing unit operations\&.
2405 .sp
2406 Added in version 258\&.
2407 .RE
2408 .PP
2409 \fB\-\-no\-warn\fR
2410 .RS 4
2411 Do not generate the warnings shown by default in the following cases:
2412 .sp
2413 .RS 4
2414 .ie n \{\
2415 \h'-04'\(bu\h'+03'\c
2416 .\}
2417 .el \{\
2418 .sp -1
2419 .IP \(bu 2.3
2420 .\}
2421 when
2422 \fBsystemctl\fR
2423 is invoked without procfs mounted on
2424 /proc/,
2425 .RE
2426 .sp
2427 .RS 4
2428 .ie n \{\
2429 \h'-04'\(bu\h'+03'\c
2430 .\}
2431 .el \{\
2432 .sp -1
2433 .IP \(bu 2.3
2434 .\}
2435 when using
2436 \fBenable\fR
2437 or
2438 \fBdisable\fR
2439 on units without install information (i\&.e\&. do not have or have an empty [Install] section),
2440 .RE
2441 .sp
2442 .RS 4
2443 .ie n \{\
2444 \h'-04'\(bu\h'+03'\c
2445 .\}
2446 .el \{\
2447 .sp -1
2448 .IP \(bu 2.3
2449 .\}
2450 when using
2451 \fBdisable\fR
2452 combined with
2453 \fB\-\-user\fR
2454 on units that are enabled in global scope,
2455 .RE
2456 .sp
2457 .RS 4
2458 .ie n \{\
2459 \h'-04'\(bu\h'+03'\c
2460 .\}
2461 .el \{\
2462 .sp -1
2463 .IP \(bu 2.3
2464 .\}
2465 when a
2466 \fBstop\fR\-ped,
2467 \fBdisable\fR\-d, or
2468 \fBmask\fR\-ed unit still has active triggering units,
2469 .RE
2470 .sp
2471 .RS 4
2472 .ie n \{\
2473 \h'-04'\(bu\h'+03'\c
2474 .\}
2475 .el \{\
2476 .sp -1
2477 .IP \(bu 2.3
2478 .\}
2479 when a unit file is changed and requires
2480 \fBdaemon\-reload\fR\&.
2481 .RE
2482 .sp
2483 Added in version 253\&.
2484 .RE
2485 .PP
2486 \fB\-\-no\-block\fR
2487 .RS 4
2488 Do not synchronously wait for the requested operation to finish\&. If this is not specified, the job will be verified, enqueued and
2489 \fBsystemctl\fR
2490 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
2491 \fB\-\-wait\fR\&.
2492 .RE
2493 .PP
2494 \fB\-\-wait\fR
2495 .RS 4
2496 When used with
2497 \fBstart\fR
2498 or
2499 \fBrestart\fR, synchronously wait for started units to terminate again\&. This option may not be combined with
2500 \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
2501 "RemainAfterExit=yes"\&.
2502 .sp
2503 When used with
2504 \fBis\-system\-running\fR, wait until the boot process is completed before returning\&.
2505 .sp
2506 When used with
2507 \fBkill\fR, wait until the signalled units terminate\&. Note that this will wait forever if any given unit never terminates\&.
2508 .sp
2509 Added in version 232\&.
2510 .RE
2511 .PP
2512 \fB\-\-user\fR
2513 .RS 4
2514 Talk to the service manager of the calling user, rather than the service manager of the system\&.
2515 .RE
2516 .PP
2517 \fB\-\-system\fR
2518 .RS 4
2519 Talk to the service manager of the system\&. This is the implied default\&.
2520 .RE
2521 .PP
2522 \fB\-\-failed\fR
2523 .RS 4
2524 List units in failed state\&. This is equivalent to
2525 \fB\-\-state=failed\fR\&.
2526 .sp
2527 Added in version 233\&.
2528 .RE
2529 .PP
2530 \fB\-\-no\-wall\fR
2531 .RS 4
2532 Do not send wall message before halt, power\-off and reboot\&.
2533 .RE
2534 .PP
2535 \fB\-\-global\fR
2536 .RS 4
2537 When used with
2538 \fBenable\fR
2539 and
2540 \fBdisable\fR, operate on the global user configuration directory, thus enabling or disabling a unit file globally for all future logins of all users\&.
2541 .RE
2542 .PP
2543 \fB\-\-no\-reload\fR
2544 .RS 4
2545 When used with
2546 \fBenable\fR,
2547 \fBdisable\fR,
2548 \fBpreset\fR,
2549 \fBmask\fR, or
2550 \fBunmask\fR, do not implicitly reload daemon configuration after executing the changes\&.
2551 .RE
2552 .PP
2553 \fB\-\-kill\-whom=\fR
2554 .RS 4
2555 When used with
2556 \fBkill\fR, choose which processes to send a UNIX process signal to\&. Must be one of
2557 \fBmain\fR,
2558 \fBcontrol\fR,
2559 \fBcgroup\fR
2560 or
2561 \fBall\fR
2562 to select whether to kill only the main process, the control process, all processes in the unit\*(Aqs control group 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
2563 \fIExecStartPre=\fR,
2564 \fIExecStop=\fR
2565 or
2566 \fIExecReload=\fR
2567 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
2568 \fIType=forking\fR, the initial process started by the manager for
2569 \fIExecStart=\fR
2570 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
2571 \fIExecStart=\fR
2572 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 part of the unit\*(Aqs control group\&. Not all unit types manage processes of these types however\&. For example, for mount units, control processes are defined (which are the invocations of
2573 /usr/bin/mount
2574 and
2575 /usr/bin/umount), but no main process is defined\&. If omitted, defaults to
2576 \fBall\fR, except if
2577 \fB\-\-kill\-subgroup=\fR
2578 is used in which case defaults to
2579 \fBcgroup\fR\&.
2580 .sp
2581 Added in version 252\&.
2582 .RE
2583 .PP
2584 \fB\-\-kill\-value=\fR\fB\fIINT\fR\fR
2585 .RS 4
2586 If used with the
2587 \fBkill\fR
2588 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\&.
2589 \fB\-\-signal=SIGRTMIN+\&...\fR
2590 or
2591 \fB\-\-signal=SIGRTMAX\-\&...\fR), and ensures the signals are generated via the
2592 \fBsigqueue\fR(3)
2593 system call, rather than
2594 \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
2595 "0x"), octal (if prefixed with
2596 "0o") or binary (if prefixed with
2597 "0b")
2598 .sp
2599 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\&.
2600 \fB\-\-kill\-whom=all\fR
2601 will only affect main and control processes but no other processes\&.
2602 .sp
2603 Added in version 254\&.
2604 .RE
2605 .PP
2606 \fB\-\-kill\-subgroup=\fR\fB\fIPATH\fR\fR
2607 .RS 4
2608 Takes a control group sub\-path to send signals to, for use with the
2609 \fBkill\fR
2610 command\&. By default the chosen signal is delivered to all processes of the unit\*(Aqs cgroups (as well as the main/control processes (if outside) \(en subject to
2611 \fB\-\-kill\-whom=\fR)\&. But with this option a subgroup can be selelected instead\&. This functionality is only available if
2612 "cgroup"
2613 or
2614 "cgroup\-fail"
2615 are used with
2616 \fB\-\-kill\-whom=\fR, and in fact the former is the default if
2617 \fB\-\-kill\-subgroup=\fR
2618 is used\&.
2619 .sp
2620 The specified path may, but doesn\*(Aqt have to be prefixed with a slash, and its absence or presence has no effect, the path is either way taken relative to the unit\*(Aqs main control group path\&.
2621 .sp
2622 This functionality is only available on units where control group delegation is enabled (see
2623 \fIDelegate=\fR
2624 in
2625 \fBsystemd.resource-control\fR(5))\&.
2626 .sp
2627 Added in version 258\&.
2628 .RE
2629 .PP
2630 \fB\-s\fR, \fB\-\-signal=\fR
2631 .RS 4
2632 When used with
2633 \fBkill\fR, choose which signal to send to selected processes\&. Must be one of the well\-known signal specifiers such as
2634 \fBSIGTERM\fR,
2635 \fBSIGINT\fR
2636 or
2637 \fBSIGSTOP\fR\&. If omitted, defaults to
2638 \fBSIGTERM\fR\&.
2639 .sp
2640 The special value
2641 "help"
2642 will list the known values and the program will exit immediately, and the special value
2643 "list"
2644 will list known values along with the numerical signal numbers and the program will exit immediately\&.
2645 .RE
2646 .PP
2647 \fB\-\-what=\fR
2648 .RS 4
2649 Select what type of per\-unit resources to remove when the
2650 \fBclean\fR
2651 command is invoked, see above\&. Takes one of
2652 \fBconfiguration\fR,
2653 \fBstate\fR,
2654 \fBcache\fR,
2655 \fBlogs\fR,
2656 \fBruntime\fR,
2657 \fBfdstore\fR
2658 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
2659 \fBall\fR
2660 as a shortcut for specifying all six resource types\&. If this option is not specified defaults to the combination of
2661 \fBcache\fR,
2662 \fBruntime\fR
2663 and
2664 \fBfdstore\fR, i\&.e\&. the three kinds of resources that are generally considered to be redundant and can be reconstructed on next invocation\&. The empty argument can be used to reset to this default\&.
2665 .sp
2666 Note that the explicit removal of the
2667 \fBfdstore\fR
2668 resource type is only useful if the
2669 \fIFileDescriptorStorePreserve=\fR
2670 option is enabled, since the file descriptor store is otherwise cleaned automatically when the unit is stopped\&.
2671 .sp
2672 Added in version 243\&.
2673 .RE
2674 .PP
2675 \fB\-f\fR, \fB\-\-force\fR
2676 .RS 4
2677 When used with
2678 \fBenable\fR, overwrite any existing conflicting symlinks\&.
2679 .sp
2680 When used with
2681 \fBedit\fR, create all of the specified units which do not already exist\&.
2682 .sp
2683 When used with
2684 \fBsuspend\fR,
2685 \fBhibernate\fR,
2686 \fBhybrid\-sleep\fR, or
2687 \fBsuspend\-then\-hibernate\fR, the error returned by
2688 \fBsystemd\-logind\fR
2689 will be ignored, and the operation will be performed directly through starting the corresponding units\&.
2690 .sp
2691 When used with
2692 \fBhalt\fR,
2693 \fBpoweroff\fR,
2694 \fBreboot\fR, or
2695 \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
2696 \fB\-\-force\fR
2697 is specified twice for these operations (with the exception of
2698 \fBkexec\fR), they will be executed immediately, without terminating any processes or unmounting any file systems\&.
2699 .if n \{\
2700 .sp
2701 .\}
2702 .RS 4
2703 .it 1 an-trap
2704 .nr an-no-space-flag 1
2705 .nr an-break-flag 1
2706 .br
2707 .ps +1
2708 \fBWarning\fR
2709 .ps -1
2710 .br
2711 Specifying
2712 \fB\-\-force\fR
2713 twice with any of these operations might result in data loss\&. Note that when
2714 \fB\-\-force\fR
2715 is specified twice the selected operation is executed by
2716 \fBsystemctl\fR
2717 itself, and the system manager is not contacted\&. This means the command should succeed even when the system manager has crashed\&.
2718 .sp .5v
2719 .RE
2720 .RE
2721 .PP
2722 \fB\-\-message=\fR
2723 .RS 4
2724 When used with
2725 \fBhalt\fR,
2726 \fBpoweroff\fR
2727 or
2728 \fBreboot\fR, set a short message explaining the reason for the operation\&. The message will be logged together with the default shutdown message\&.
2729 .sp
2730 Added in version 225\&.
2731 .RE
2732 .PP
2733 \fB\-\-now\fR
2734 .RS 4
2735 When used with
2736 \fBenable\fR,
2737 \fBdisable\fR,
2738 \fBmask\fR, or
2739 \fBreenable\fR, also start/stop/try\-restart the units after the specified unit file operations succeed\&.
2740 .sp
2741 Added in version 220\&.
2742 .RE
2743 .PP
2744 \fB\-\-root=\fR
2745 .RS 4
2746 When used with
2747 \fBenable\fR/\fBdisable\fR/\fBis\-enabled\fR
2748 (and related commands), use the specified root path when looking for unit files\&. If this option is present,
2749 \fBsystemctl\fR
2750 will operate on the file system directly, instead of communicating with the
2751 \fBsystemd\fR
2752 daemon to carry out changes\&.
2753 .RE
2754 .PP
2755 \fB\-\-image=\fR\fB\fIimage\fR\fR
2756 .RS 4
2757 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
2758 \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
2759 \m[blue]\fBUAPI\&.2 Discoverable Partitions Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. For further information on supported disk images, see
2760 \fBsystemd-nspawn\fR(1)\*(Aqs switch of the same name\&.
2761 .sp
2762 Added in version 252\&.
2763 .RE
2764 .PP
2765 \fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
2766 .RS 4
2767 Takes an image policy string as argument, as per
2768 \fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
2769 \fB\-\-image=\fR, see above\&. If not specified, defaults to the
2770 "*"
2771 policy, i\&.e\&. all recognized file systems in the image are used\&.
2772 .RE
2773 .PP
2774 \fB\-\-runtime\fR
2775 .RS 4
2776 When used with
2777 \fBenable\fR,
2778 \fBdisable\fR,
2779 \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
2780 /etc/
2781 but in
2782 /run/, with identical immediate effects, however, since the latter is lost on reboot, the changes are lost too\&.
2783 .sp
2784 Similarly, when used with
2785 \fBset\-property\fR, make changes only temporarily, so that they are lost on the next reboot\&.
2786 .RE
2787 .PP
2788 \fB\-\-preset\-mode=\fR
2789 .RS 4
2790 Takes one of
2791 "full"
2792 (the default),
2793 "enable\-only",
2794 "disable\-only"\&. When used with the
2795 \fBpreset\fR
2796 or
2797 \fBpreset\-all\fR
2798 commands, controls whether units shall be disabled and enabled according to the preset rules, or only enabled, or only disabled\&.
2799 .sp
2800 Added in version 215\&.
2801 .RE
2802 .PP
2803 \fB\-n\fR, \fB\-\-lines=\fR
2804 .RS 4
2805 When used with
2806 \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\&.
2807 .RE
2808 .PP
2809 \fB\-o\fR, \fB\-\-output=\fR
2810 .RS 4
2811 When used with
2812 \fBstatus\fR, controls the formatting of the journal entries that are shown\&. For the available choices, see
2813 \fBjournalctl\fR(1)\&. Defaults to
2814 "short"\&.
2815 .RE
2816 .PP
2817 \fB\-\-firmware\-setup\fR
2818 .RS 4
2819 When used with the
2820 \fBreboot\fR,
2821 \fBpoweroff\fR, or
2822 \fBhalt\fR
2823 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\&.
2824 .sp
2825 Added in version 220\&.
2826 .RE
2827 .PP
2828 \fB\-\-boot\-loader\-menu=\fR\fB\fItimeout\fR\fR
2829 .RS 4
2830 When used with the
2831 \fBreboot\fR,
2832 \fBpoweroff\fR, or
2833 \fBhalt\fR
2834 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\&.
2835 .sp
2836 Added in version 242\&.
2837 .RE
2838 .PP
2839 \fB\-\-boot\-loader\-entry=\fR\fB\fIID\fR\fR
2840 .RS 4
2841 When used with the
2842 \fBreboot\fR,
2843 \fBpoweroff\fR, or
2844 \fBhalt\fR
2845 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
2846 "help"
2847 in order to list available entries\&. Note that not all boot loaders support this functionality\&.
2848 .sp
2849 Added in version 242\&.
2850 .RE
2851 .PP
2852 \fB\-\-reboot\-argument=\fR
2853 .RS 4
2854 This switch is used with
2855 \fBreboot\fR\&. The value is architecture and firmware specific\&. As an example,
2856 "recovery"
2857 might be used to trigger system recovery, and
2858 "fota"
2859 might be used to trigger a
2860 \(lqfirmware over the air\(rq
2861 update\&.
2862 .sp
2863 Added in version 246\&.
2864 .RE
2865 .PP
2866 \fB\-\-kernel\-cmdline=\fR
2867 .RS 4
2868 When used with
2869 \fBkexec\fR, append the specified string to the kernel command line options of the kexec kernel\&. The kernel command line is taken from the boot loader entry of the currently booted kernel (as selected automatically when no kexec kernel is preloaded, see
2870 \fBkexec\fR
2871 above)\&. This string is appended verbatim, separated from the existing options by a single space\&.
2872 \fBsystemctl kexec\fR
2873 will fail if this option is specified when a kexec kernel is already loaded\&.
2874 .sp
2875 Added in version 261\&.
2876 .RE
2877 .PP
2878 \fB\-\-plain\fR
2879 .RS 4
2880 When used with
2881 \fBlist\-dependencies\fR,
2882 \fBlist\-units\fR
2883 or
2884 \fBlist\-machines\fR, the output is printed as a list instead of a tree, and the bullet circles are omitted\&.
2885 .sp
2886 Added in version 203\&.
2887 .RE
2888 .PP
2889 \fB\-\-timestamp=\fR
2890 .RS 4
2891 Change the format of printed timestamps\&. The following values may be used:
2892 .PP
2893 \fBpretty\fR (this is the default)
2894 .RS 4
2895 "Day YYYY\-MM\-DD HH:MM:SS TZ"
2896 .sp
2897 Added in version 248\&.
2898 .RE
2899 .PP
2900 \fBunix\fR
2901 .RS 4
2902 "@seconds\-since\-the\-epoch"
2903 .sp
2904 Added in version 251\&.
2905 .RE
2906 .PP
2907 \fBus\fR, \fBμs\fR
2908 .RS 4
2909 "Day YYYY\-MM\-DD HH:MM:SS\&.UUUUUU TZ"
2910 .sp
2911 Added in version 248\&.
2912 .RE
2913 .PP
2914 \fButc\fR
2915 .RS 4
2916 "Day YYYY\-MM\-DD HH:MM:SS UTC"
2917 .sp
2918 Added in version 248\&.
2919 .RE
2920 .PP
2921 \fBus+utc\fR, \fBμs+utc\fR
2922 .RS 4
2923 "Day YYYY\-MM\-DD HH:MM:SS\&.UUUUUU UTC"
2924 .sp
2925 Added in version 248\&.
2926 .RE
2927 .sp
2928 Added in version 247\&.
2929 .RE
2930 .PP
2931 \fB\-\-mkdir\fR
2932 .RS 4
2933 When used with
2934 \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\&.
2935 .sp
2936 Added in version 248\&.
2937 .RE
2938 .PP
2939 \fB\-\-read\-only\fR
2940 .RS 4
2941 When used with
2942 \fBbind\fR, creates a read\-only bind mount\&.
2943 .sp
2944 Added in version 248\&.
2945 .RE
2946 .PP
2947 \fB\-\-drop\-in=\fR\fB\fINAME\fR\fR
2948 .RS 4
2949 When used with
2950 \fBedit\fR, use
2951 \fINAME\fR
2952 as the drop\-in file name instead of
2953 override\&.conf\&.
2954 .sp
2955 Added in version 253\&.
2956 .RE
2957 .PP
2958 \fB\-\-when=\fR
2959 .RS 4
2960 When used with
2961 \fBhalt\fR,
2962 \fBpoweroff\fR,
2963 \fBreboot\fR
2964 or
2965 \fBkexec\fR, schedule the action to be performed at the given timestamp, which should adhere to the syntax documented in
2966 \fBsystemd.time\fR(7)
2967 section "PARSING TIMESTAMPS"\&. Specially, if
2968 "show"
2969 is given, the currently scheduled action will be shown, which can be canceled by passing an empty string or
2970 "cancel"\&.
2971 "auto"
2972 will schedule the action according to maintenance window or one minute in the future\&.
2973 .sp
2974 Added in version 254\&.
2975 .RE
2976 .PP
2977 \fB\-\-stdin\fR
2978 .RS 4
2979 When used with
2980 \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:
2981 .sp
2982 .if n \{\
2983 .RS 4
2984 .\}
2985 .nf
2986 $ systemctl edit \-\-drop\-in=limits\&.conf \-\-stdin some\-service\&.service <<EOF
2987 [Unit]
2988 AllowedCPUs=7,11
2989 EOF
2990 .fi
2991 .if n \{\
2992 .RE
2993 .\}
2994 .sp
2995 Multiple drop\-ins may be "edited" in this mode; the same contents will be written to all of them\&.
2996 .sp
2997 Added in version 256\&.
2998 .RE
2999 .PP
3000 \fB\-H\fR, \fB\-\-host=\fR
3001 .RS 4
3002 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
3003 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
3004 ":", and then a container name, separated by
3005 "/", 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
3006 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
3007 .RE
3008 .PP
3009 \fB\-M\fR, \fB\-\-machine=\fR
3010 .RS 4
3011 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
3012 "@"
3013 character\&. If the special string
3014 "\&.host"
3015 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:
3016 "\-\-user \-\-machine=lennart@\&.host")\&. If the
3017 "@"
3018 syntax is not used, the connection is made as root user\&. If the
3019 "@"
3020 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
3021 "\&.host"
3022 are implied\&.
3023 .RE
3024 .PP
3025 \fB\-C\fR, \fB\-\-capsule=\fR
3026 .RS 4
3027 Execute operation on a capsule\&. Specify a capsule name to connect to\&. See
3028 \[email protected]\fR(5)
3029 for details about capsules\&.
3030 .sp
3031 Added in version 256\&.
3032 .RE
3033 .PP
3034 \fB\-\-no\-ask\-password\fR
3035 .RS 4
3036 Do not query the user for authentication for privileged operations\&.
3037 .RE
3038 .PP
3039 \fB\-\-no\-pager\fR
3040 .RS 4
3041 Do not pipe output into a pager\&.
3042 .RE
3043 .PP
3044 \fB\-\-legend=\fR\fB\fIBOOL\fR\fR
3045 .RS 4
3046 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
3047 \fB\-\-quiet\fR
3048 or similar\&.
3049 .RE
3050 .PP
3051 \fB\-h\fR, \fB\-\-help\fR
3052 .RS 4
3053 Print a short help text and exit\&.
3054 .RE
3055 .PP
3056 \fB\-\-version\fR
3057 .RS 4
3058 Print a short version string and exit\&.
3059 .RE
3060 .SH "EXIT STATUS"
3061 .PP
3062 On success, 0 is returned, a non\-zero failure code otherwise\&.
3063 .PP
3064 \fBsystemctl\fR
3065 uses the return codes defined by LSB, as defined in
3066 \m[blue]\fBLSB 3\&.0\&.0\fR\m[]\&\s-2\u[3]\d\s+2\&.
3067 .sp
3068 .it 1 an-trap
3069 .nr an-no-space-flag 1
3070 .nr an-break-flag 1
3071 .br
3072 .B Table\ \&5.\ \&LSB return codes
3073 .TS
3074 allbox tab(:);
3075 lB lB lB.
3076 T{
3077 Value
3078 T}:T{
3079 Description in LSB
3080 T}:T{
3081 Use in systemd
3082 T}
3083 .T&
3084 l l l
3085 l l l
3086 l l l
3087 l l l
3088 l l l.
3089 T{
3090 \fB0\fR
3091 T}:T{
3092 "program is running or service is OK"
3093 T}:T{
3094 unit is active
3095 T}
3096 T{
3097 \fB1\fR
3098 T}:T{
3099 "program is dead and /var/run pid file exists"
3100 T}:T{
3101 unit \fInot\fR failed (used by \fBis\-failed\fR)
3102 T}
3103 T{
3104 \fB2\fR
3105 T}:T{
3106 "program is dead and /var/lock lock file exists"
3107 T}:T{
3108 unused
3109 T}
3110 T{
3111 \fB3\fR
3112 T}:T{
3113 "program is not running"
3114 T}:T{
3115 unit is not active
3116 T}
3117 T{
3118 \fB4\fR
3119 T}:T{
3120 "program or service status is unknown"
3121 T}:T{
3122 no such unit
3123 T}
3124 .TE
3125 .sp 1
3126 .PP
3127 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\&.
3128 .SH "ENVIRONMENT"
3129 .PP
3130 \fI$SYSTEMD_EDITOR\fR
3131 .RS 4
3132 Editor to use when editing units; overrides
3133 \fI$EDITOR\fR
3134 and
3135 \fI$VISUAL\fR\&. If neither
3136 \fI$SYSTEMD_EDITOR\fR
3137 nor
3138 \fI$EDITOR\fR
3139 nor
3140 \fI$VISUAL\fR
3141 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:
3142 \fBeditor\fR(1),
3143 \fBnano\fR(1),
3144 \fBvim\fR(1),
3145 \fBvi\fR(1)\&.
3146 .sp
3147 Added in version 218\&.
3148 .RE
3149 .PP
3150 \fI$SYSTEMD_LOG_LEVEL\fR
3151 .RS 4
3152 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)
3153 \fBemerg\fR,
3154 \fBalert\fR,
3155 \fBcrit\fR,
3156 \fBerr\fR,
3157 \fBwarning\fR,
3158 \fBnotice\fR,
3159 \fBinfo\fR,
3160 \fBdebug\fR, or an integer in the range 0\&...7\&. See
3161 \fBsyslog\fR(3)
3162 for more information\&. Each value may optionally be prefixed with one of
3163 \fBconsole\fR,
3164 \fBsyslog\fR,
3165 \fBkmsg\fR
3166 or
3167 \fBjournal\fR
3168 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
3169 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
3170 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\&.
3171 .RE
3172 .PP
3173 \fI$SYSTEMD_LOG_COLOR\fR
3174 .RS 4
3175 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
3176 .sp
3177 This setting is only useful when messages are written directly to the terminal, because
3178 \fBjournalctl\fR(1)
3179 and other tools that display logs will color messages based on the log level on their own\&.
3180 .RE
3181 .PP
3182 \fI$SYSTEMD_LOG_TIME\fR
3183 .RS 4
3184 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
3185 .sp
3186 This setting is only useful when messages are written directly to the terminal or a file, because
3187 \fBjournalctl\fR(1)
3188 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
3189 .RE
3190 .PP
3191 \fI$SYSTEMD_LOG_LOCATION\fR
3192 .RS 4
3193 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
3194 .sp
3195 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\&.
3196 .RE
3197 .PP
3198 \fI$SYSTEMD_LOG_TARGET\fR
3199 .RS 4
3200 The destination for log messages\&. One of
3201 \fBconsole\fR
3202 (log to the attached tty),
3203 \fBconsole\-prefixed\fR
3204 (log to the attached tty but with prefixes encoding the log level and "facility", see
3205 \fBsyslog\fR(3),
3206 \fBkmsg\fR
3207 (log to the kernel circular log buffer),
3208 \fBjournal\fR
3209 (log to the journal),
3210 \fBjournal\-or\-kmsg\fR
3211 (log to the journal if available, and to kmsg otherwise),
3212 \fBauto\fR
3213 (determine the appropriate log target automatically, the default),
3214 \fBnull\fR
3215 (disable log output)\&.
3216 .RE
3217 .PP
3218 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
3219 .RS 4
3220 Pager to use when
3221 \fB\-\-no\-pager\fR
3222 is not given\&.
3223 \fI$SYSTEMD_PAGER\fR
3224 is used if set; otherwise
3225 \fI$PAGER\fR
3226 is used\&. If neither
3227 \fI$SYSTEMD_PAGER\fR
3228 nor
3229 \fI$PAGER\fR
3230 are set, a set of well\-known pager implementations is tried in turn, including
3231 \fBless\fR(1)
3232 and
3233 \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
3234 "cat"
3235 is equivalent to passing
3236 \fB\-\-no\-pager\fR\&.
3237 .sp
3238 Note: if
3239 \fI$SYSTEMD_PAGERSECURE\fR
3240 is not set,
3241 \fI$SYSTEMD_PAGER\fR
3242 and
3243 \fI$PAGER\fR
3244 can only be used to disable the pager (with
3245 "cat"
3246 or
3247 ""), and are otherwise ignored\&.
3248 .RE
3249 .PP
3250 \fI$SYSTEMD_LESS\fR
3251 .RS 4
3252 Override the options passed to
3253 \fBless\fR
3254 (by default
3255 "FRSXMK")\&.
3256 .sp
3257 Users might want to change two options in particular:
3258 .PP
3259 \fBK\fR
3260 .RS 4
3261 This option instructs the pager to exit immediately when
3262 Ctrl+C
3263 is pressed\&. To allow
3264 \fBless\fR
3265 to handle
3266 Ctrl+C
3267 itself to switch back to the pager command prompt, unset this option\&.
3268 .sp
3269 If the value of
3270 \fI$SYSTEMD_LESS\fR
3271 does not include
3272 "K", and the pager that is invoked is
3273 \fBless\fR,
3274 Ctrl+C
3275 will be ignored by the executable, and needs to be handled by the pager\&.
3276 .RE
3277 .PP
3278 \fBX\fR
3279 .RS 4
3280 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\&.
3281 .RE
3282 .sp
3283 Note that setting the regular
3284 \fI$LESS\fR
3285 environment variable has no effect for
3286 \fBless\fR
3287 invocations by systemd tools\&.
3288 .sp
3289 See
3290 \fBless\fR(1)
3291 for more discussion\&.
3292 .RE
3293 .PP
3294 \fI$SYSTEMD_LESSCHARSET\fR
3295 .RS 4
3296 Override the charset passed to
3297 \fBless\fR
3298 (by default
3299 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
3300 .sp
3301 Note that setting the regular
3302 \fI$LESSCHARSET\fR
3303 environment variable has no effect for
3304 \fBless\fR
3305 invocations by systemd tools\&.
3306 .RE
3307 .PP
3308 \fI$SYSTEMD_PAGERSECURE\fR
3309 .RS 4
3310 Common pager commands like
3311 \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
3312 \fBsudo\fR(8)
3313 or
3314 \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,
3315 \fIif the pager supports that\fR
3316 (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
3317 \fB\-\-no\-pager\fR
3318 or
3319 \fIPAGER=cat\fR
3320 when allowing untrusted users to execute commands with elevated privileges\&.
3321 .sp
3322 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
3323 \fBLESSSECURE=1\fR
3324 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
3325 \fBless\fR(1)
3326 is known to understand this variable and implement "secure mode"\&.
3327 .sp
3328 When set to false, no limitation is placed on the pager\&. Setting
3329 \fISYSTEMD_PAGERSECURE=0\fR
3330 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
3331 .sp
3332 When
3333 \fI$SYSTEMD_PAGERSECURE\fR
3334 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
3335 \fBgeteuid\fR(2)
3336 and
3337 \fBsd_pid_get_owner_uid\fR(3), or when running under
3338 \fBsudo\fR(8)
3339 or similar tools (\fI$SUDO_UID\fR
3340 is set
3341 \&\s-2\u[4]\d\s+2)\&. In those cases,
3342 \fISYSTEMD_PAGERSECURE=1\fR
3343 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
3344 \fI$SYSTEMD_PAGERSECURE\fR
3345 or disable the pager\&.
3346 .sp
3347 Note that if the
3348 \fI$SYSTEMD_PAGER\fR
3349 or
3350 \fI$PAGER\fR
3351 variables are to be honoured, other than to disable the pager,
3352 \fI$SYSTEMD_PAGERSECURE\fR
3353 must be set too\&.
3354 .RE
3355 .PP
3356 \fI$SYSTEMD_COLORS\fR
3357 .RS 4
3358 Takes a boolean argument, or a special value\&. By default (unset),
3359 \fBsystemd\fR
3360 and related utilities will use colors in their output if possible\&. If
3361 \fI$COLORTERM\fR
3362 is set to
3363 "truecolor"
3364 or
3365 "24bit", 24\-bit colors will be enabled, 256 colors otherwise, unless
3366 \fI$NO_COLOR\fR
3367 or
3368 \fI$TERM\fR
3369 indicates colors are disabled\&.
3370 .PP
3371 \fBtrue\fR
3372 .RS 4
3373 Same as unset, except that
3374 \fI$NO_COLOR\fR
3375 is ignored\&.
3376 .RE
3377 .PP
3378 \fBfalse\fR
3379 .RS 4
3380 The output will be monochrome\&.
3381 .RE
3382 .PP
3383 "16", "256", "24bit"
3384 .RS 4
3385 Always use the base 16 ANSI colors, 256 colors, or 24 bit color, respectively\&.
3386 .RE
3387 .PP
3388 "auto\-16", "auto\-256", "auto\-24bit"
3389 .RS 4
3390 Use the given quantity of colours, subject to
3391 \fI$TERM\fR, and what the console is connected to\&.
3392 .RE
3393 .RE
3394 .PP
3395 \fI$SYSTEMD_URLIFY\fR
3396 .RS 4
3397 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
3398 \fBsystemd\fR
3399 makes based on
3400 \fI$TERM\fR
3401 and other conditions\&.
3402 .RE
3403 .SH "SEE ALSO"
3404 .PP
3405 \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)
3406 .SH "NOTES"
3407 .IP " 1." 4
3408 UAPI.1 Boot Loader Specification
3409 .RS 4
3410 \%https://uapi-group.org/specifications/specs/boot_loader_specification
3411 .RE
3412 .IP " 2." 4
3413 UAPI.2 Discoverable Partitions Specification
3414 .RS 4
3415 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
3416 .RE
3417 .IP " 3." 4
3418 LSB 3.0.0
3419 .RS 4
3420 \%http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
3421 .RE
3422 .IP " 4." 4
3423 It is recommended for other tools to set and check
3424 \fI$SUDO_UID\fR
3425 as appropriate, treating it is a common interface.
3426