]> git.proxmox.com Git - systemd.git/blob - man/systemctl.1
Imported Upstream version 219
[systemd.git] / man / systemctl.1
1 '\" t
2 .TH "SYSTEMCTL" "1" "" "systemd 219" "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 [NAME...]
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 "OPTIONS"
36 .PP
37 The following options are understood:
38 .PP
39 \fB\-t\fR, \fB\-\-type=\fR
40 .RS 4
41 The argument should be a comma\-separated list of unit types such as
42 \fBservice\fR
43 and
44 \fBsocket\fR\&.
45 .sp
46 If one of the arguments is a unit type, when listing units, limit display to certain unit types\&. Otherwise, units of all types will be shown\&.
47 .sp
48 As a special case, if one of the arguments is
49 \fBhelp\fR, a list of allowed values will be printed and the program will exit\&.
50 .RE
51 .PP
52 \fB\-\-state=\fR
53 .RS 4
54 The argument should be a comma\-separated list of unit LOAD, SUB, or ACTIVE states\&. When listing units, show only those in specified states\&. Use
55 \fB\-\-state=failed\fR
56 to show only failed units\&.
57 .RE
58 .PP
59 \fB\-p\fR, \fB\-\-property=\fR
60 .RS 4
61 When showing unit/job/manager properties with the
62 \fBshow\fR
63 command, limit display to certain properties as specified as argument\&. If not specified, all set properties are shown\&. The argument should be a comma\-separated list of property names, such as
64 "MainPID"\&. If specified more than once, all properties with the specified names are shown\&.
65 .RE
66 .PP
67 \fB\-a\fR, \fB\-\-all\fR
68 .RS 4
69 When listing units, show all loaded units, regardless of their state, including inactive units\&. When showing unit/job/manager properties, show all properties regardless whether they are set or not\&.
70 .sp
71 To list all units installed on the system, use the
72 \fBlist\-unit\-files\fR
73 command instead\&.
74 .RE
75 .PP
76 \fB\-r\fR, \fB\-\-recursive\fR
77 .RS 4
78 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 (":")\&.
79 .RE
80 .PP
81 \fB\-\-reverse\fR
82 .RS 4
83 Show reverse dependencies between units with
84 \fBlist\-dependencies\fR, i\&.e\&. follow dependencies of type
85 \fIWantedBy=\fR,
86 \fIRequiredBy=\fR,
87 \fIRequiredByOverrridable=\fR,
88 \fIPartOf=\fR,
89 \fIBoundBy=\fR, instead of
90 \fIWants=\fR
91 and similar\&.
92 .RE
93 .PP
94 \fB\-\-after\fR
95 .RS 4
96 With
97 \fBlist\-dependencies\fR, show the units that are ordered before the specified unit\&. In other words, recursively list units following the
98 \fIAfter=\fR
99 dependency\&.
100 .sp
101 Note that any
102 \fIAfter=\fR
103 dependency is automatically mirrored to create a
104 \fIBefore=\fR
105 dependency\&. Temporal dependencies may be specified explicitly, but are also created implicitly for units which are
106 \fIWantedBy=\fR
107 targets (see
108 \fBsystemd.target\fR(5)), and as a result of other directives (for example
109 \fIRequiresMountsFor=\fR)\&. Both explicitly and implicitly introduced dependencies are shown with
110 \fBlist\-dependencies\fR\&.
111 .RE
112 .PP
113 \fB\-\-before\fR
114 .RS 4
115 With
116 \fBlist\-dependencies\fR, show the units that are ordered after the specified unit\&. In other words, recursively list units following the
117 \fIBefore=\fR
118 dependency\&.
119 .RE
120 .PP
121 \fB\-l\fR, \fB\-\-full\fR
122 .RS 4
123 Do not ellipsize unit names, process tree entries, journal output, or truncate unit descriptions in the output of
124 \fBstatus\fR,
125 \fBlist\-units\fR,
126 \fBlist\-jobs\fR, and
127 \fBlist\-timers\fR\&.
128 .RE
129 .PP
130 \fB\-\-show\-types\fR
131 .RS 4
132 When showing sockets, show the type of the socket\&.
133 .RE
134 .PP
135 \fB\-\-job\-mode=\fR
136 .RS 4
137 When queuing a new job, this option controls how to deal with already queued jobs\&. It takes one of
138 "fail",
139 "replace",
140 "replace\-irreversibly",
141 "isolate",
142 "ignore\-dependencies",
143 "ignore\-requirements"
144 or
145 "flush"\&. Defaults to
146 "replace", except when the
147 \fBisolate\fR
148 command is used which implies the
149 "isolate"
150 job mode\&.
151 .sp
152 If
153 "fail"
154 is specified and a requested operation conflicts with a pending job (more specifically: causes an already pending start job to be reversed into a stop job or vice versa), cause the operation to fail\&.
155 .sp
156 If
157 "replace"
158 (the default) is specified, any conflicting pending job will be replaced, as necessary\&.
159 .sp
160 If
161 "replace\-irreversibly"
162 is specified, operate like
163 "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
164 \fBcancel\fR
165 command\&.
166 .sp
167 "isolate"
168 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
169 \fBisolate\fR
170 command is used\&.
171 .sp
172 "flush"
173 will cause all queued jobs to be canceled when the new job is enqueued\&.
174 .sp
175 If
176 "ignore\-dependencies"
177 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\&.
178 .sp
179 "ignore\-requirements"
180 is similar to
181 "ignore\-dependencies", but only causes the requirement dependencies to be ignored, the ordering dependencies will still be honoured\&.
182 .RE
183 .PP
184 \fB\-i\fR, \fB\-\-ignore\-inhibitors\fR
185 .RS 4
186 When system shutdown or a sleep state is requested, ignore inhibitor locks\&. Applications can establish inhibitor locks to avoid that certain important operations (such as CD burning or suchlike) are interrupted by system shutdown or a sleep state\&. 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 (regardless of whether privileged or not) and a list of active locks is printed\&. However, if
187 \fB\-\-ignore\-inhibitors\fR
188 is specified, the locks are ignored and not printed, and the operation attempted anyway, possibly requiring additional privileges\&.
189 .RE
190 .PP
191 \fB\-q\fR, \fB\-\-quiet\fR
192 .RS 4
193 Suppress output to standard output in
194 \fBsnapshot\fR,
195 \fBis\-active\fR,
196 \fBis\-failed\fR,
197 \fBis\-enabled\fR,
198 \fBis\-system\-running\fR,
199 \fBenable\fR
200 and
201 \fBdisable\fR\&.
202 .RE
203 .PP
204 \fB\-\-no\-block\fR
205 .RS 4
206 Do not synchronously wait for the requested operation to finish\&. If this is not specified, the job will be verified, enqueued and
207 \fBsystemctl\fR
208 will wait until it is completed\&. By passing this argument, it is only verified and enqueued\&.
209 .RE
210 .PP
211 \fB\-\-user\fR
212 .RS 4
213 Talk to the service manager of the calling user, rather than the service manager of the system\&.
214 .RE
215 .PP
216 \fB\-\-system\fR
217 .RS 4
218 Talk to the service manager of the system\&. This is the implied default\&.
219 .RE
220 .PP
221 \fB\-\-no\-wall\fR
222 .RS 4
223 Do not send wall message before halt, power\-off, reboot\&.
224 .RE
225 .PP
226 \fB\-\-global\fR
227 .RS 4
228 When used with
229 \fBenable\fR
230 and
231 \fBdisable\fR, operate on the global user configuration directory, thus enabling or disabling a unit file globally for all future logins of all users\&.
232 .RE
233 .PP
234 \fB\-\-no\-reload\fR
235 .RS 4
236 When used with
237 \fBenable\fR
238 and
239 \fBdisable\fR, do not implicitly reload daemon configuration after executing the changes\&.
240 .RE
241 .PP
242 \fB\-\-no\-ask\-password\fR
243 .RS 4
244 When used with
245 \fBstart\fR
246 and related commands, disables asking for passwords\&. Background services may require input of a password or passphrase string, for example to unlock system hard disks or cryptographic certificates\&. Unless this option is specified and the command is invoked from a terminal,
247 \fBsystemctl\fR
248 will query the user on the terminal for the necessary secrets\&. Use this option to switch this behavior off\&. In this case, the password must be supplied by some other means (for example graphical password agents) or the service might fail\&. This also disables querying the user for authentication for privileged operations\&.
249 .RE
250 .PP
251 \fB\-\-kill\-who=\fR
252 .RS 4
253 When used with
254 \fBkill\fR, choose which processes to send a signal to\&. Must be one of
255 \fBmain\fR,
256 \fBcontrol\fR
257 or
258 \fBall\fR
259 to select whether to kill only the main process, the control process or all processes of the unit\&. The main process of the unit is the one that defines the life\-time of it\&. A control process of a unit is one that is invoked by the manager to induce state changes of it\&. For example, all processes started due to the
260 \fIExecStartPre=\fR,
261 \fIExecStop=\fR
262 or
263 \fIExecReload=\fR
264 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
265 \fIType=forking\fR, the initial process started by the manager for
266 \fIExecStart=\fR
267 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
268 \fIExecStart=\fR
269 is always the main process itself\&. A service unit consists of zero or one main process, zero or one control process plus any number of additional processes\&. Not all unit types manage processes of these types however\&. For example, for mount units, control processes are defined (which are the invocations of
270 /usr/bin/mount
271 and
272 /usr/bin/umount), but no main process is defined\&. If omitted, defaults to
273 \fBall\fR\&.
274 .RE
275 .PP
276 \fB\-s\fR, \fB\-\-signal=\fR
277 .RS 4
278 When used with
279 \fBkill\fR, choose which signal to send to selected processes\&. Must be one of the well known signal specifiers such as
280 \fBSIGTERM\fR,
281 \fBSIGINT\fR
282 or
283 \fBSIGSTOP\fR\&. If omitted, defaults to
284 \fBSIGTERM\fR\&.
285 .RE
286 .PP
287 \fB\-f\fR, \fB\-\-force\fR
288 .RS 4
289 When used with
290 \fBenable\fR, overwrite any existing conflicting symlinks\&.
291 .sp
292 When used with
293 \fBhalt\fR,
294 \fBpoweroff\fR,
295 \fBreboot\fR
296 or
297 \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
298 \fB\-\-force\fR
299 is specified twice for these operations, they will be executed immediately without terminating any processes or unmounting any file systems\&. Warning: specifying
300 \fB\-\-force\fR
301 twice with any of these operations might result in data loss\&.
302 .RE
303 .PP
304 \fB\-\-root=\fR
305 .RS 4
306 When used with
307 \fBenable\fR/\fBdisable\fR/\fBis\-enabled\fR
308 (and related commands), use alternative root path when looking for unit files\&.
309 .RE
310 .PP
311 \fB\-\-runtime\fR
312 .RS 4
313 When used with
314 \fBenable\fR,
315 \fBdisable\fR,
316 \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
317 /etc
318 but in
319 /run, with identical immediate effects, however, since the latter is lost on reboot, the changes are lost too\&.
320 .sp
321 Similarly, when used with
322 \fBset\-property\fR, make changes only temporarily, so that they are lost on the next reboot\&.
323 .RE
324 .PP
325 \fB\-\-preset\-mode=\fR
326 .RS 4
327 Takes one of
328 "full"
329 (the default),
330 "enable\-only",
331 "disable\-only"\&. When used with the
332 \fBpreset\fR
333 or
334 \fBpreset\-all\fR
335 commands, controls whether units shall be disabled and enabled according to the preset rules, or only enabled, or only disabled\&.
336 .RE
337 .PP
338 \fB\-n\fR, \fB\-\-lines=\fR
339 .RS 4
340 When used with
341 \fBstatus\fR, controls the number of journal lines to show, counting from the most recent ones\&. Takes a positive integer argument\&. Defaults to 10\&.
342 .RE
343 .PP
344 \fB\-o\fR, \fB\-\-output=\fR
345 .RS 4
346 When used with
347 \fBstatus\fR, controls the formatting of the journal entries that are shown\&. For the available choices, see
348 \fBjournalctl\fR(1)\&. Defaults to
349 "short"\&.
350 .RE
351 .PP
352 \fB\-\-plain\fR
353 .RS 4
354 When used with
355 \fBlist\-dependencies\fR, the output is printed as a list instead of a tree\&.
356 .RE
357 .PP
358 \fB\-H\fR, \fB\-\-host=\fR
359 .RS 4
360 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
361 "@", to connect to\&. The hostname may optionally be suffixed by a container name, separated by
362 ":", 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
363 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&.
364 .RE
365 .PP
366 \fB\-M\fR, \fB\-\-machine=\fR
367 .RS 4
368 Execute operation on a local container\&. Specify a container name to connect to\&.
369 .RE
370 .PP
371 \fB\-\-no\-pager\fR
372 .RS 4
373 Do not pipe output into a pager\&.
374 .RE
375 .PP
376 \fB\-\-no\-legend\fR
377 .RS 4
378 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
379 .RE
380 .PP
381 \fB\-h\fR, \fB\-\-help\fR
382 .RS 4
383 Print a short help text and exit\&.
384 .RE
385 .PP
386 \fB\-\-version\fR
387 .RS 4
388 Print a short version string and exit\&.
389 .RE
390 .SH "COMMANDS"
391 .PP
392 The following commands are understood:
393 .SS "Unit Commands"
394 .PP
395 \fBlist\-units \fR\fB[\fIPATTERN\fR\&.\&.\&.]\fR
396 .RS 4
397 List known units (subject to limitations specified with
398 \fB\-t\fR)\&. If one or more
399 \fIPATTERN\fRs are specified, only units matching one of them are shown\&.
400 .sp
401 This is the default command\&.
402 .RE
403 .PP
404 \fBlist\-sockets \fR\fB[\fIPATTERN\fR\&.\&.\&.]\fR
405 .RS 4
406 List socket units ordered by listening address\&. If one or more
407 \fIPATTERN\fRs are specified, only socket units matching one of them are shown\&. Produces output similar to
408 .sp
409 .if n \{\
410 .RS 4
411 .\}
412 .nf
413 LISTEN UNIT ACTIVATES
414 /dev/initctl systemd\-initctl\&.socket systemd\-initctl\&.service
415 \&.\&.\&.
416 [::]:22 sshd\&.socket sshd\&.service
417 kobject\-uevent 1 systemd\-udevd\-kernel\&.socket systemd\-udevd\&.service
418
419 5 sockets listed\&.
420 .fi
421 .if n \{\
422 .RE
423 .\}
424 .sp
425 Note: because the addresses might contains spaces, this output is not suitable for programmatic consumption\&.
426 .sp
427 See also the options
428 \fB\-\-show\-types\fR,
429 \fB\-\-all\fR, and
430 \fB\-\-state=\fR\&.
431 .RE
432 .PP
433 \fBlist\-timers \fR\fB[\fIPATTERN\fR\&.\&.\&.]\fR
434 .RS 4
435 List timer units ordered by the time they elapse next\&. If one or more
436 \fIPATTERN\fRs are specified, only units matching one of them are shown\&.
437 .sp
438 See also the options
439 \fB\-\-all\fR
440 and
441 \fB\-\-state=\fR\&.
442 .RE
443 .PP
444 \fBstart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
445 .RS 4
446 Start (activate) one or more units specified on the command line\&.
447 .sp
448 Note that glob patterns operate on a list of currently loaded units\&. Units which are not active and are not in a failed state usually are not loaded, and would 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
449 \fBstart\fR
450 has limited usefulness\&.
451 .RE
452 .PP
453 \fBstop \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
454 .RS 4
455 Stop (deactivate) one or more units specified on the command line\&.
456 .RE
457 .PP
458 \fBreload \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
459 .RS 4
460 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
461 \fBdaemon\-reload\fR
462 command\&. In other words: for the example case of Apache, this will reload Apache\*(Aqs
463 httpd\&.conf
464 in the web server, not the
465 apache\&.service
466 systemd unit file\&.
467 .sp
468 This command should not be confused with the
469 \fBdaemon\-reload\fR
470 command\&.
471 .RE
472 .PP
473 \fBrestart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
474 .RS 4
475 Restart one or more units specified on the command line\&. If the units are not running yet, they will be started\&.
476 .RE
477 .PP
478 \fBtry\-restart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
479 .RS 4
480 Restart one or more units specified on the command line if the units are running\&. This does nothing if units are not running\&. Note that, for compatibility with Red Hat init scripts,
481 \fBcondrestart\fR
482 is equivalent to this command\&.
483 .RE
484 .PP
485 \fBreload\-or\-restart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
486 .RS 4
487 Reload one or more units if they support it\&. If not, restart them instead\&. If the units are not running yet, they will be started\&.
488 .RE
489 .PP
490 \fBreload\-or\-try\-restart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
491 .RS 4
492 Reload one or more units if they support it\&. If not, restart them instead\&. This does nothing if the units are not running\&. Note that, for compatibility with SysV init scripts,
493 \fBforce\-reload\fR
494 is equivalent to this command\&.
495 .RE
496 .PP
497 \fBisolate \fR\fB\fINAME\fR\fR
498 .RS 4
499 Start the unit specified on the command line and its dependencies and stop all others\&. If a unit name with no extension is given, an extension of
500 "\&.target"
501 will be assumed\&.
502 .sp
503 This is similar to changing the runlevel in a traditional init system\&. The
504 \fBisolate\fR
505 command will immediately stop processes that are not enabled in the new unit, possibly including the graphical environment or terminal you are currently using\&.
506 .sp
507 Note that this is allowed only on units where
508 \fBAllowIsolate=\fR
509 is enabled\&. See
510 \fBsystemd.unit\fR(5)
511 for details\&.
512 .RE
513 .PP
514 \fBkill \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
515 .RS 4
516 Send a signal to one or more processes of the unit\&. Use
517 \fB\-\-kill\-who=\fR
518 to select which process to kill\&. Use
519 \fB\-\-signal=\fR
520 to select the signal to send\&.
521 .RE
522 .PP
523 \fBis\-active \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
524 .RS 4
525 Check whether any of the specified units are active (i\&.e\&. running)\&. Returns an exit code
526 \fB0\fR
527 if at least one is active, or non\-zero otherwise\&. Unless
528 \fB\-\-quiet\fR
529 is specified, this will also print the current unit state to standard output\&.
530 .RE
531 .PP
532 \fBis\-failed \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
533 .RS 4
534 Check whether any of the specified units are in a "failed" state\&. Returns an exit code
535 \fB0\fR
536 if at least one has failed, non\-zero otherwise\&. Unless
537 \fB\-\-quiet\fR
538 is specified, this will also print the current unit state to standard output\&.
539 .RE
540 .PP
541 \fBstatus\fR [\fIPATTERN\fR\&.\&.\&.|\fIPID\fR\&.\&.\&.]]
542 .RS 4
543 Show terse runtime status information about one or more units, followed by most recent log data from the journal\&. If no units are specified, show system status\&. If combined with
544 \fB\-\-all\fR, also show the status of all units (subject to limitations specified with
545 \fB\-t\fR)\&. If a PID is passed, show information about the unit the process belongs to\&.
546 .sp
547 This function is intended to generate human\-readable output\&. If you are looking for computer\-parsable output, use
548 \fBshow\fR
549 instead\&. By default this function only shows 10 lines of output and ellipsizes lines to fit in the terminal window\&. This can be changes with
550 \fB\-\-lines\fR
551 and
552 \fB\-\-full\fR, see above\&. In addition,
553 \fBjournalctl \-\-unit=\fR\fB\fINAME\fR\fR
554 or
555 \fBjournalctl \-\-user\-unit=\fR\fB\fINAME\fR\fR
556 use a similar filter for messages and might be more convenient\&.
557 .RE
558 .PP
559 \fBshow\fR [\fIPATTERN\fR\&.\&.\&.|\fIJOB\fR\&.\&.\&.]
560 .RS 4
561 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 is shown, and if a job id is specified, properties of the job is shown\&. By default, empty properties are suppressed\&. Use
562 \fB\-\-all\fR
563 to show those too\&. To select specific properties to show, use
564 \fB\-\-property=\fR\&. This command is intended to be used whenever computer\-parsable output is required\&. Use
565 \fBstatus\fR
566 if you are looking for formatted human\-readable output\&.
567 .RE
568 .PP
569 \fBcat \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
570 .RS 4
571 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\&.
572 .RE
573 .PP
574 \fBset\-property \fR\fB\fINAME\fR\fR\fB \fR\fB\fIASSIGNMENT\fR\fR\fB\&.\&.\&.\fR
575 .RS 4
576 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
577 \fBsystemd.resource-control\fR(5)) may\&. The changes are applied instantly, and stored on disk for future boots, unless
578 \fB\-\-runtime\fR
579 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\&.
580 .sp
581 Example:
582 \fBsystemctl set\-property foobar\&.service CPUShares=777\fR
583 .sp
584 Note that this command allows changing multiple properties at the same time, which is preferable over setting them individually\&. Like unit file configuration settings, assigning the empty list to list parameters will reset the list\&.
585 .RE
586 .PP
587 \fBhelp \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.|\fR\fB\fIPID\fR\fR\fB\&.\&.\&.\fR
588 .RS 4
589 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\&.
590 .RE
591 .PP
592 \fBreset\-failed [\fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.]\fR
593 .RS 4
594 Reset the
595 "failed"
596 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
597 "failed"
598 state and its exit code and status is recorded for introspection by the administrator until the service is restarted or reset with this command\&.
599 .RE
600 .PP
601 \fBlist\-dependencies\fR [\fINAME\fR]
602 .RS 4
603 Shows units required and wanted by the specified unit\&. This recursively lists units following the
604 \fIRequires=\fR,
605 \fIRequiresOverridable=\fR,
606 \fIRequisite=\fR,
607 \fIRequisiteOverridable=\fR,
608 \fIWants=\fR,
609 \fIBindsTo=\fR
610 dependencies\&. If no unit is specified,
611 default\&.target
612 is implied\&.
613 .sp
614 By default, only target units are recursively expanded\&. When
615 \fB\-\-all\fR
616 is passed, all other units are recursively expanded as well\&.
617 .sp
618 Options
619 \fB\-\-reverse\fR,
620 \fB\-\-after\fR,
621 \fB\-\-before\fR
622 may be used to change what types of dependencies are shown\&.
623 .RE
624 .SS "Unit File Commands"
625 .PP
626 \fBlist\-unit\-files \fR\fB[\fIPATTERN\&.\&.\&.\fR]\fR
627 .RS 4
628 List installed unit files\&. If one or more
629 \fIPATTERN\fRs are specified, only units whose filename (just the last component of the path) matches one of them are shown\&.
630 .RE
631 .PP
632 \fBenable \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
633 .RS 4
634 Enable one or more unit files or unit file instances, as specified on the command line\&. This will create a number of symlinks as encoded in the
635 "[Install]"
636 sections of the unit files\&. After the symlinks have been created, the systemd configuration is reloaded (in a way that is equivalent to
637 \fBdaemon\-reload\fR) to ensure the changes are taken into account immediately\&. Note that this does
638 \fInot\fR
639 have the effect of also starting any of the units being enabled\&. If this is desired, a separate
640 \fBstart\fR
641 command must be invoked for the unit\&. Also note that in case of instance enablement, symlinks named the same as instances are created in the install location, however they all point to the same template unit file\&.
642 .sp
643 This command will print the actions executed\&. This output may be suppressed by passing
644 \fB\-\-quiet\fR\&.
645 .sp
646 Note that this operation creates only the suggested symlinks for the units\&. 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 in the 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
647 \fBdaemon\-reload\fR
648 manually as necessary to ensure the changes are taken into account\&.
649 .sp
650 Enabling units should not be confused with starting (activating) units, as done by the
651 \fBstart\fR
652 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\&.
653 .sp
654 Depending on whether
655 \fB\-\-system\fR,
656 \fB\-\-user\fR,
657 \fB\-\-runtime\fR, or
658 \fB\-\-global\fR
659 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, or only this boot\&. Note that in the last case, no systemd daemon configuration is reloaded\&.
660 .sp
661 Using
662 \fBenable\fR
663 on masked units results in an error\&.
664 .RE
665 .PP
666 \fBdisable \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
667 .RS 4
668 Disables one or more units\&. This removes all symlinks to the specified unit files from the unit configuration directory, and hence undoes the changes made by
669 \fBenable\fR\&. Note however that this removes all symlinks to the unit files (i\&.e\&. including manual additions), not just those actually created by
670 \fBenable\fR\&. This call implicitly reloads the systemd daemon configuration after completing the disabling of the units\&. Note that this command does not implicitly stop the units that are being disabled\&. If this is desired, an additional
671 \fBstop\fR
672 command should be executed afterwards\&.
673 .sp
674 This command will print the actions executed\&. This output may be suppressed by passing
675 \fB\-\-quiet\fR\&.
676 .sp
677 This command honors
678 \fB\-\-system\fR,
679 \fB\-\-user\fR,
680 \fB\-\-runtime\fR
681 and
682 \fB\-\-global\fR
683 in a similar way as
684 \fBenable\fR\&.
685 .RE
686 .PP
687 \fBreenable \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
688 .RS 4
689 Reenable one or more unit files, as specified on the command line\&. This is a combination of
690 \fBdisable\fR
691 and
692 \fBenable\fR
693 and is useful to reset the symlinks a unit is enabled with to the defaults configured in the
694 "[Install]"
695 section of the unit file\&.
696 .RE
697 .PP
698 \fBpreset \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
699 .RS 4
700 Reset 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
701 \fBdisable\fR
702 or
703 \fBenable\fR, depending how the unit is listed in the preset files\&.
704 .sp
705 Use
706 \fB\-\-preset\-mode=\fR
707 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
708 .sp
709 For more information on the preset policy format, see
710 \fBsystemd.preset\fR(5)\&. For more information on the concept of presets, please consult the
711 \m[blue]\fBPreset\fR\m[]\&\s-2\u[1]\d\s+2
712 document\&.
713 .RE
714 .PP
715 \fBpreset\-all\fR
716 .RS 4
717 Resets all installed unit files to the defaults configured in the preset policy file (see above)\&.
718 .sp
719 Use
720 \fB\-\-preset\-mode=\fR
721 to control whether units shall be enabled and disabled, or only enabled, or only disabled\&.
722 .RE
723 .PP
724 \fBis\-enabled \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
725 .RS 4
726 Checks whether any of the specified unit files are enabled (as with
727 \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
728 \fB\-\-quiet\fR\&.
729 .sp
730 .it 1 an-trap
731 .nr an-no-space-flag 1
732 .nr an-break-flag 1
733 .br
734 .B Table\ \&1.\ \& is\-enabled output
735 .TS
736 allbox tab(:);
737 lB lB lB.
738 T{
739 Printed string
740 T}:T{
741 Meaning
742 T}:T{
743 Return value
744 T}
745 .T&
746 l l l
747 l ^ ^
748 l l l
749 l ^ ^
750 l l l
751 l ^ ^
752 l l l
753 l l l
754 l l l.
755 T{
756 "enabled"
757 T}:T{
758 Enabled through a symlink in \&.wants directory (permanently or just in /run)\&.
759 T}:T{
760 0
761 T}
762 T{
763 "enabled\-runtime"
764 T}::
765 T{
766 "linked"
767 T}:T{
768 Made available through a symlink to the unit file (permanently or just in /run)\&.
769 T}:T{
770 1
771 T}
772 T{
773 "linked\-runtime"
774 T}::
775 T{
776 "masked"
777 T}:T{
778 Disabled entirely (permanently or just in /run)\&.
779 T}:T{
780 1
781 T}
782 T{
783 "masked\-runtime"
784 T}::
785 T{
786 "static"
787 T}:T{
788 Unit file is not enabled, and has no provisions for enabling in the "[Install]" section\&.
789 T}:T{
790 0
791 T}
792 T{
793 "indirect"
794 T}:T{
795 Unit file itself is not enabled, but it has a non\-empty \fIAlso=\fR setting in the "[Install]" section, listing other unit files that might be enabled\&.
796 T}:T{
797 0
798 T}
799 T{
800 "disabled"
801 T}:T{
802 Unit file is not enabled\&.
803 T}:T{
804 1
805 T}
806 .TE
807 .sp 1
808 .RE
809 .PP
810 \fBmask \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
811 .RS 4
812 Mask one or more unit files, as specified on the command line\&. This will link these units to
813 /dev/null, making it impossible to start them\&. This is a stronger version of
814 \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
815 \fB\-\-runtime\fR
816 option to only mask temporarily until the next reboot of the system\&.
817 .RE
818 .PP
819 \fBunmask \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
820 .RS 4
821 Unmask one or more unit files, as specified on the command line\&. This will undo the effect of
822 \fBmask\fR\&.
823 .RE
824 .PP
825 \fBlink \fR\fB\fIFILENAME\fR\fR\fB\&.\&.\&.\fR
826 .RS 4
827 Link a unit file that is not in the unit file search paths into the unit file search path\&. This requires an absolute path to a unit file\&. The effect of this can be undone with
828 \fBdisable\fR\&. The effect of this command is that a unit file is available for
829 \fBstart\fR
830 and other commands although it is not installed directly in the unit search path\&.
831 .RE
832 .PP
833 \fBadd\-wants \fR\fB\fITARGET\fR\fR\fB \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR, \fBadd\-requires \fR\fB\fITARGET\fR\fR\fB \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
834 .RS 4
835 Adds
836 "Wants="
837 resp\&.
838 "Requires="
839 dependency to the specified
840 \fITARGET\fR
841 for one or more units\&.
842 .sp
843 This command honors
844 \fB\-\-system\fR,
845 \fB\-\-user\fR,
846 \fB\-\-runtime\fR
847 and
848 \fB\-\-global\fR
849 in a similar way as
850 \fBenable\fR\&.
851 .RE
852 .PP
853 \fBedit \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
854 .RS 4
855 Edit a drop\-in snippet or a whole replacement file if
856 \fB\-\-full\fR
857 is specified, to extend or override the specified unit\&.
858 .sp
859 Depending on whether
860 \fB\-\-system\fR
861 (the default),
862 \fB\-\-user\fR, or
863 \fB\-\-global\fR
864 is specified, this creates a drop\-in file for each unit either for the system, for the calling user or for all futures logins of all users\&. Then, 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\&.
865 .sp
866 If
867 \fB\-\-full\fR
868 is specified, this will copy the original units instead of creating drop\-in files\&.
869 .sp
870 If
871 \fB\-\-runtime\fR
872 is specified, the changes will be made temporarily in
873 /run
874 and they will be lost on the next reboot\&.
875 .sp
876 If the temporary file is empty upon exit the modification of the related unit is canceled
877 .sp
878 After the units have been edited, systemd configuration is reloaded (in a way that is equivalent to
879 \fBdaemon\-reload\fR)\&.
880 .sp
881 Note that this command cannot be used to remotely edit units and that you cannot temporarily edit units which are in
882 /etc
883 since they take precedence over
884 /run\&.
885 .RE
886 .PP
887 \fBget\-default\fR
888 .RS 4
889 Return the default target to boot into\&. This returns the target unit name
890 default\&.target
891 is aliased (symlinked) to\&.
892 .RE
893 .PP
894 \fBset\-default \fR\fB\fINAME\fR\fR
895 .RS 4
896 Set the default target to boot into\&. This sets (symlinks) the
897 default\&.target
898 alias to the given target unit\&.
899 .RE
900 .SS "Machine Commands"
901 .PP
902 \fBlist\-machines \fR\fB[\fIPATTERN\fR\&.\&.\&.]\fR
903 .RS 4
904 List the host and all running local containers with their state\&. If one or more
905 \fIPATTERN\fRs are specified, only containers matching one of them are shown\&.
906 .RE
907 .SS "Job Commands"
908 .PP
909 \fBlist\-jobs \fR\fB[\fIPATTERN\&.\&.\&.\fR]\fR
910 .RS 4
911 List jobs that are in progress\&. If one or more
912 \fIPATTERN\fRs are specified, only jobs for units matching one of them are shown\&.
913 .RE
914 .PP
915 \fBcancel \fR\fB\fIJOB\fR\fR\fB\&.\&.\&.\fR
916 .RS 4
917 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\&.
918 .RE
919 .SS "Snapshot Commands"
920 .PP
921 \fBsnapshot \fR\fB[\fINAME\fR]\fR
922 .RS 4
923 Create a snapshot\&. If a snapshot name is specified, the new snapshot will be named after it\&. If none is specified, an automatic snapshot name is generated\&. In either case, the snapshot name used is printed to standard output, unless
924 \fB\-\-quiet\fR
925 is specified\&.
926 .sp
927 A snapshot refers to a saved state of the systemd manager\&. It is implemented itself as a unit that is generated dynamically with this command and has dependencies on all units active at the time\&. At a later time, the user may return to this state by using the
928 \fBisolate\fR
929 command on the snapshot unit\&.
930 .sp
931 Snapshots are only useful for saving and restoring which units are running or are stopped, they do not save/restore any other state\&. Snapshots are dynamic and lost on reboot\&.
932 .RE
933 .PP
934 \fBdelete \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
935 .RS 4
936 Remove a snapshot previously created with
937 \fBsnapshot\fR\&.
938 .RE
939 .SS "Environment Commands"
940 .PP
941 \fBshow\-environment\fR
942 .RS 4
943 Dump the systemd manager environment block\&. The environment block will be dumped in straight\-forward form suitable for sourcing into a shell script\&. This environment block will be passed to all processes the manager spawns\&.
944 .RE
945 .PP
946 \fBset\-environment \fR\fB\fIVARIABLE=VALUE\fR\fR\fB\&.\&.\&.\fR
947 .RS 4
948 Set one or more systemd manager environment variables, as specified on the command line\&.
949 .RE
950 .PP
951 \fBunset\-environment \fR\fB\fIVARIABLE\fR\fR\fB\&.\&.\&.\fR
952 .RS 4
953 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\&.
954 .RE
955 .PP
956 \fBimport\-environment\fR [\fIVARIABLE\&.\&.\&.\fR]
957 .RS 4
958 Import all, one or more environment variables set on the client into the systemd manager environment block\&. If no arguments are passed, the entire environment block is imported\&. Otherwise, a list of one or more environment variable names should be passed, whose client\-side values are then imported into the manager\*(Aqs environment block\&.
959 .RE
960 .SS "Manager Lifecycle Commands"
961 .PP
962 \fBdaemon\-reload\fR
963 .RS 4
964 Reload systemd manager configuration\&. This will rerun all generators (see
965 \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\&.
966 .sp
967 This command should not be confused with the
968 \fBreload\fR
969 command\&.
970 .RE
971 .PP
972 \fBdaemon\-reexec\fR
973 .RS 4
974 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
975 \fBdaemon\-reload\fR\&. While the daemon is being reexecuted, all sockets systemd listening on behalf of user configuration will stay accessible\&.
976 .RE
977 .SS "System Commands"
978 .PP
979 \fBis\-system\-running\fR
980 .RS 4
981 Checks whether the system is operational\&. This returns success when the system is fully up and running, meaning not in startup, shutdown or maintenance mode\&. Failure is returned otherwise\&. In addition, the current state is printed in a short string to standard output, see table below\&. Use
982 \fB\-\-quiet\fR
983 to suppress this output\&.
984 .sp
985 .it 1 an-trap
986 .nr an-no-space-flag 1
987 .nr an-break-flag 1
988 .br
989 .B Table\ \&2.\ \&Manager Operational States
990 .TS
991 allbox tab(:);
992 lB lB.
993 T{
994 Name
995 T}:T{
996 Description
997 T}
998 .T&
999 l l
1000 l l
1001 l l
1002 l l
1003 l l
1004 l l.
1005 T{
1006 \fIinitializing\fR
1007 T}:T{
1008 Early bootup, before
1009 basic\&.target
1010 is reached or the
1011 \fImaintenance\fR
1012 state entered\&.
1013 T}
1014 T{
1015 \fIstarting\fR
1016 T}:T{
1017 Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached\&.
1018 T}
1019 T{
1020 \fIrunning\fR
1021 T}:T{
1022 The system is fully operational\&.
1023 T}
1024 T{
1025 \fIdegraded\fR
1026 T}:T{
1027 The system is operational but one or more units failed\&.
1028 T}
1029 T{
1030 \fImaintenance\fR
1031 T}:T{
1032 The rescue or emergency target is active\&.
1033 T}
1034 T{
1035 \fIstopping\fR
1036 T}:T{
1037 The manager is shutting down\&.
1038 T}
1039 .TE
1040 .sp 1
1041 .RE
1042 .PP
1043 \fBdefault\fR
1044 .RS 4
1045 Enter default mode\&. This is mostly equivalent to
1046 \fBisolate default\&.target\fR\&.
1047 .RE
1048 .PP
1049 \fBrescue\fR
1050 .RS 4
1051 Enter rescue mode\&. This is mostly equivalent to
1052 \fBisolate rescue\&.target\fR, but also prints a wall message to all users\&.
1053 .RE
1054 .PP
1055 \fBemergency\fR
1056 .RS 4
1057 Enter emergency mode\&. This is mostly equivalent to
1058 \fBisolate emergency\&.target\fR, but also prints a wall message to all users\&.
1059 .RE
1060 .PP
1061 \fBhalt\fR
1062 .RS 4
1063 Shut down and halt the system\&. This is mostly equivalent to
1064 \fBstart halt\&.target \-\-irreversible\fR, but also prints a wall message to all users\&. If combined with
1065 \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
1066 \fB\-\-force\fR
1067 is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems\&. This may result in data loss\&.
1068 .RE
1069 .PP
1070 \fBpoweroff\fR
1071 .RS 4
1072 Shut down and power\-off the system\&. This is mostly equivalent to
1073 \fBstart poweroff\&.target \-\-irreversible\fR, but also prints a wall message to all users\&. If combined with
1074 \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 powering off\&. If
1075 \fB\-\-force\fR
1076 is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems\&. This may result in data loss\&.
1077 .RE
1078 .PP
1079 \fBreboot \fR\fB[\fIarg\fR]\fR
1080 .RS 4
1081 Shut down and reboot the system\&. This is mostly equivalent to
1082 \fBstart reboot\&.target \-\-irreversible\fR, but also prints a wall message to all users\&. If combined with
1083 \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 reboot\&. If
1084 \fB\-\-force\fR
1085 is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems\&. This may result in data loss\&.
1086 .sp
1087 If the optional argument
1088 \fIarg\fR
1089 is given, it will be passed as the optional argument to the
1090 \fBreboot\fR(2)
1091 system call\&. The value is architecture and firmware specific\&. As an example,
1092 "recovery"
1093 might be used to trigger system recovery, and
1094 "fota"
1095 might be used to trigger a
1096 \(lqfirmware over the air\(rq
1097 update\&.
1098 .RE
1099 .PP
1100 \fBkexec\fR
1101 .RS 4
1102 Shut down and reboot the system via kexec\&. This is mostly equivalent to
1103 \fBstart kexec\&.target \-\-irreversible\fR, but also prints a wall message to all users\&. If combined with
1104 \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 reboot\&.
1105 .RE
1106 .PP
1107 \fBexit\fR
1108 .RS 4
1109 Ask the systemd manager to quit\&. This is only supported for user service managers (i\&.e\&. in conjunction with the
1110 \fB\-\-user\fR
1111 option) and will fail otherwise\&.
1112 .RE
1113 .PP
1114 \fBswitch\-root \fR\fB\fIROOT\fR\fR\fB \fR\fB[\fIINIT\fR]\fR
1115 .RS 4
1116 Switches to a different root directory and executes a new system manager process below it\&. This is intended for usage in initial RAM disks ("initrd"), and will transition from the initrd\*(Aqs system manager process (a\&.k\&.a "init" process) to the main system manager process\&. 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 the latter is omitted or the empty string, a systemd binary will automatically be searched for and used as init\&. If the system manager path is omitted or equal to the empty string, 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\&.
1117 .RE
1118 .PP
1119 \fBsuspend\fR
1120 .RS 4
1121 Suspend the system\&. This will trigger activation of the special
1122 suspend\&.target
1123 target\&.
1124 .RE
1125 .PP
1126 \fBhibernate\fR
1127 .RS 4
1128 Hibernate the system\&. This will trigger activation of the special
1129 hibernate\&.target
1130 target\&.
1131 .RE
1132 .PP
1133 \fBhybrid\-sleep\fR
1134 .RS 4
1135 Hibernate and suspend the system\&. This will trigger activation of the special
1136 hybrid\-sleep\&.target
1137 target\&.
1138 .RE
1139 .SS "Parameter Syntax"
1140 .PP
1141 Unit commands listed above take either a single unit name (designated as
1142 \fINAME\fR), or multiple unit specifications (designated as
1143 \fIPATTERN\fR\&.\&.\&.)\&. In the first case, the unit name with or without a suffix must be given\&. If the suffix is not specified, systemctl will append a suitable suffix,
1144 "\&.service"
1145 by default, and a type\-specific suffix in case of commands which operate only on specific unit types\&. For example,
1146 .sp
1147 .if n \{\
1148 .RS 4
1149 .\}
1150 .nf
1151 # systemctl start sshd
1152 .fi
1153 .if n \{\
1154 .RE
1155 .\}
1156 .sp
1157 and
1158 .sp
1159 .if n \{\
1160 .RS 4
1161 .\}
1162 .nf
1163 # systemctl start sshd\&.service
1164 .fi
1165 .if n \{\
1166 .RE
1167 .\}
1168 .sp
1169 are equivalent, as are
1170 .sp
1171 .if n \{\
1172 .RS 4
1173 .\}
1174 .nf
1175 # systemctl isolate default
1176 .fi
1177 .if n \{\
1178 .RE
1179 .\}
1180 .sp
1181 and
1182 .sp
1183 .if n \{\
1184 .RS 4
1185 .\}
1186 .nf
1187 # systemctl isolate default\&.target
1188 .fi
1189 .if n \{\
1190 .RE
1191 .\}
1192 .sp
1193 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute) paths to mount unit names\&.
1194 .sp
1195 .if n \{\
1196 .RS 4
1197 .\}
1198 .nf
1199 # systemctl status /dev/sda
1200 # systemctl status /home
1201 .fi
1202 .if n \{\
1203 .RE
1204 .\}
1205 .sp
1206 are equivalent to:
1207 .sp
1208 .if n \{\
1209 .RS 4
1210 .\}
1211 .nf
1212 # systemctl status dev\-sda\&.device
1213 # systemctl status home\&.mount
1214 .fi
1215 .if n \{\
1216 .RE
1217 .\}
1218 .sp
1219 In the second case, shell\-style globs will be matched against currently loaded units; 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\&.
1220 .PP
1221 Glob patterns use
1222 \fBfnmatch\fR(3), so normal shell\-style globbing rules are used, and
1223 "*",
1224 "?",
1225 "[]"
1226 may be used\&. See
1227 \fBglob\fR(7)
1228 for more details\&. The patterns are matched against the names of currently loaded units, and patterns which do not match anything are silently skipped\&. For example:
1229 .sp
1230 .if n \{\
1231 .RS 4
1232 .\}
1233 .nf
1234 # systemctl stop sshd@*\&.service
1235 .fi
1236 .if n \{\
1237 .RE
1238 .\}
1239 .sp
1240 will stop all
1241 sshd@\&.service
1242 instances\&.
1243 .PP
1244 For unit file commands, the specified
1245 \fINAME\fR
1246 should be the full name of the unit file, or the absolute path to the unit file:
1247 .sp
1248 .if n \{\
1249 .RS 4
1250 .\}
1251 .nf
1252 # systemctl enable foo\&.service
1253 .fi
1254 .if n \{\
1255 .RE
1256 .\}
1257 .sp
1258 or
1259 .sp
1260 .if n \{\
1261 .RS 4
1262 .\}
1263 .nf
1264 # systemctl link /path/to/foo\&.service
1265 .fi
1266 .if n \{\
1267 .RE
1268 .\}
1269 .sp
1270 .SH "EXIT STATUS"
1271 .PP
1272 On success, 0 is returned, a non\-zero failure code otherwise\&.
1273 .SH "ENVIRONMENT"
1274 .PP
1275 \fI$SYSTEMD_EDITOR\fR
1276 .RS 4
1277 Editor to use when editing units; overrides
1278 \fI$EDITOR\fR
1279 and
1280 \fI$VISUAL\fR\&. If neither
1281 \fI$SYSTEMD_EDITOR\fR
1282 nor
1283 \fI$EDITOR\fR
1284 nor
1285 \fI$VISUAL\fR
1286 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:
1287 \fBnano\fR(1),
1288 \fBvim\fR(1),
1289 \fBvi\fR(1)\&.
1290 .RE
1291 .PP
1292 \fI$SYSTEMD_PAGER\fR
1293 .RS 4
1294 Pager to use when
1295 \fB\-\-no\-pager\fR
1296 is not given; overrides
1297 \fI$PAGER\fR\&. Setting this to an empty string or the value
1298 "cat"
1299 is equivalent to passing
1300 \fB\-\-no\-pager\fR\&.
1301 .RE
1302 .PP
1303 \fI$SYSTEMD_LESS\fR
1304 .RS 4
1305 Override the default options passed to
1306 \fBless\fR
1307 ("FRSXMK")\&.
1308 .RE
1309 .SH "SEE ALSO"
1310 .PP
1311 \fBsystemd\fR(1),
1312 \fBjournalctl\fR(1),
1313 \fBloginctl\fR(1),
1314 \fBmachinectl\fR(1),
1315 \fBsystemd.unit\fR(5),
1316 \fBsystemd.resource-management\fR(5),
1317 \fBsystemd.special\fR(7),
1318 \fBwall\fR(1),
1319 \fBsystemd.preset\fR(5),
1320 \fBsystemd.generator\fR(7),
1321 \fBglob\fR(7)
1322 .SH "NOTES"
1323 .IP " 1." 4
1324 Preset
1325 .RS 4
1326 \%http://freedesktop.org/wiki/Software/systemd/Preset
1327 .RE