]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemctl.xml
man: document interaction of --root= and the user/group databases (#7344)
[thirdparty/systemd.git] / man / systemctl.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 This file is part of systemd.
10
11 Copyright 2010 Lennart Poettering
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 -->
26
27 <refentry id="systemctl"
28 xmlns:xi="http://www.w3.org/2001/XInclude">
29
30 <refentryinfo>
31 <title>systemctl</title>
32 <productname>systemd</productname>
33
34 <authorgroup>
35 <author>
36 <contrib>Developer</contrib>
37 <firstname>Lennart</firstname>
38 <surname>Poettering</surname>
39 <email>lennart@poettering.net</email>
40 </author>
41 </authorgroup>
42 </refentryinfo>
43
44 <refmeta>
45 <refentrytitle>systemctl</refentrytitle>
46 <manvolnum>1</manvolnum>
47 </refmeta>
48
49 <refnamediv>
50 <refname>systemctl</refname>
51 <refpurpose>Control the systemd system and service manager</refpurpose>
52 </refnamediv>
53
54 <refsynopsisdiv>
55 <cmdsynopsis>
56 <command>systemctl</command>
57 <arg choice="opt" rep="repeat">OPTIONS</arg>
58 <arg choice="plain">COMMAND</arg>
59 <arg choice="opt" rep="repeat">NAME</arg>
60 </cmdsynopsis>
61 </refsynopsisdiv>
62
63 <refsect1>
64 <title>Description</title>
65
66 <para><command>systemctl</command> may be used to introspect and
67 control the state of the <literal>systemd</literal> system and
68 service manager. Please refer to
69 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
70 for an introduction into the basic concepts and functionality this
71 tool manages.</para>
72 </refsect1>
73
74 <refsect1>
75 <title>Options</title>
76
77 <para>The following options are understood:</para>
78
79 <variablelist>
80 <varlistentry>
81 <term><option>-t</option></term>
82 <term><option>--type=</option></term>
83
84 <listitem>
85 <para>The argument should be a comma-separated list of unit
86 types such as <option>service</option> and
87 <option>socket</option>.
88 </para>
89
90 <para>If one of the arguments is a unit type, when listing
91 units, limit display to certain unit types. Otherwise, units
92 of all types will be shown.</para>
93
94 <para>As a special case, if one of the arguments is
95 <option>help</option>, a list of allowed values will be
96 printed and the program will exit.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term><option>--state=</option></term>
102
103 <listitem>
104 <para>The argument should be a comma-separated list of unit
105 LOAD, SUB, or ACTIVE states. When listing units, show only
106 those in the specified states. Use <option>--state=failed</option>
107 to show only failed units.</para>
108
109 <para>As a special case, if one of the arguments is
110 <option>help</option>, a list of allowed values will be
111 printed and the program will exit.</para>
112 </listitem>
113 </varlistentry>
114
115 <varlistentry>
116 <term><option>-p</option></term>
117 <term><option>--property=</option></term>
118
119 <listitem>
120 <para>When showing unit/job/manager properties with the
121 <command>show</command> command, limit display to properties
122 specified in the argument. The argument should be a
123 comma-separated list of property names, such as
124 <literal>MainPID</literal>. Unless specified, all known
125 properties are shown. If specified more than once, all
126 properties with the specified names are shown. Shell
127 completion is implemented for property names.</para>
128
129 <para>For the manager itself,
130 <command>systemctl show</command> will show all available
131 properties. Those properties are documented in
132 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
133 </para>
134
135 <para>Properties for units vary by unit type, so showing any
136 unit (even a non-existent one) is a way to list properties
137 pertaining to this type. Similarly, showing any job will list
138 properties pertaining to all jobs. Properties for units are
139 documented in
140 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
141 and the pages for individual unit types
142 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
143 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
144 etc.</para>
145 </listitem>
146 </varlistentry>
147
148 <varlistentry>
149 <term><option>-a</option></term>
150 <term><option>--all</option></term>
151
152 <listitem>
153 <para>When listing units with <command>list-units</command>, also show inactive units and
154 units which are following other units. When showing unit/job/manager properties, show all
155 properties regardless whether they are set or not.</para>
156
157 <para>To list all units installed in the file system, use the
158 <command>list-unit-files</command> command instead.</para>
159
160 <para>When listing units with <command>list-dependencies</command>, recursively show
161 dependencies of all dependent units (by default only dependencies of target units are
162 shown).</para>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry>
167 <term><option>-r</option></term>
168 <term><option>--recursive</option></term>
169
170 <listitem>
171 <para>When listing units, also show units of local
172 containers. Units of local containers will be prefixed with
173 the container name, separated by a single colon character
174 (<literal>:</literal>).</para>
175 </listitem>
176 </varlistentry>
177
178 <varlistentry>
179 <term><option>--reverse</option></term>
180
181 <listitem>
182 <para>Show reverse dependencies between units with
183 <command>list-dependencies</command>, i.e. follow
184 dependencies of type <varname>WantedBy=</varname>,
185 <varname>RequiredBy=</varname>,
186 <varname>PartOf=</varname>, <varname>BoundBy=</varname>,
187 instead of <varname>Wants=</varname> and similar.
188 </para>
189 </listitem>
190 </varlistentry>
191
192 <varlistentry>
193 <term><option>--after</option></term>
194
195 <listitem>
196 <para>With <command>list-dependencies</command>, show the
197 units that are ordered before the specified unit. In other
198 words, recursively list units following the
199 <varname>After=</varname> dependency.</para>
200
201 <para>Note that any <varname>After=</varname> dependency is
202 automatically mirrored to create a
203 <varname>Before=</varname> dependency. Temporal dependencies
204 may be specified explicitly, but are also created implicitly
205 for units which are <varname>WantedBy=</varname> targets
206 (see
207 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
208 and as a result of other directives (for example
209 <varname>RequiresMountsFor=</varname>). Both explicitly
210 and implicitly introduced dependencies are shown with
211 <command>list-dependencies</command>.</para>
212
213 <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs are
214 waiting for it. May be combined with <option>--before</option> to show both the jobs waiting for each job as
215 well as all jobs each job is waiting for.</para>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry>
220 <term><option>--before</option></term>
221
222 <listitem>
223 <para>With <command>list-dependencies</command>, show the
224 units that are ordered after the specified unit. In other
225 words, recursively list units following the
226 <varname>Before=</varname> dependency.</para>
227
228 <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs it
229 is waiting for. May be combined with <option>--after</option> to show both the jobs waiting for each job as
230 well as all jobs each job is waiting for.</para>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry>
235 <term><option>-l</option></term>
236 <term><option>--full</option></term>
237
238 <listitem>
239 <para>Do not ellipsize unit names, process tree entries,
240 journal output, or truncate unit descriptions in the output
241 of <command>status</command>, <command>list-units</command>,
242 <command>list-jobs</command>, and
243 <command>list-timers</command>.</para>
244 <para>Also, show installation targets in the output of
245 <command>is-enabled</command>.</para>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry>
250 <term><option>--value</option></term>
251
252 <listitem>
253 <para>When printing properties with <command>show</command>,
254 only print the value, and skip the property name and
255 <literal>=</literal>.</para>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry>
260 <term><option>--show-types</option></term>
261
262 <listitem>
263 <para>When showing sockets, show the type of the socket.</para>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry>
268 <term><option>--job-mode=</option></term>
269
270 <listitem>
271 <para>When queuing a new job, this option controls how to deal with
272 already queued jobs. It takes one of <literal>fail</literal>,
273 <literal>replace</literal>,
274 <literal>replace-irreversibly</literal>,
275 <literal>isolate</literal>,
276 <literal>ignore-dependencies</literal>,
277 <literal>ignore-requirements</literal> or
278 <literal>flush</literal>. Defaults to
279 <literal>replace</literal>, except when the
280 <command>isolate</command> command is used which implies the
281 <literal>isolate</literal> job mode.</para>
282
283 <para>If <literal>fail</literal> is specified and a requested
284 operation conflicts with a pending job (more specifically:
285 causes an already pending start job to be reversed into a stop
286 job or vice versa), cause the operation to fail.</para>
287
288 <para>If <literal>replace</literal> (the default) is
289 specified, any conflicting pending job will be replaced, as
290 necessary.</para>
291
292 <para>If <literal>replace-irreversibly</literal> is specified,
293 operate like <literal>replace</literal>, but also mark the new
294 jobs as irreversible. This prevents future conflicting
295 transactions from replacing these jobs (or even being enqueued
296 while the irreversible jobs are still pending). Irreversible
297 jobs can still be cancelled using the <command>cancel</command>
298 command. This job mode should be used on any transaction which
299 pulls in <filename>shutdown.target</filename>.</para>
300
301 <para><literal>isolate</literal> is only valid for start
302 operations and causes all other units to be stopped when the
303 specified unit is started. This mode is always used when the
304 <command>isolate</command> command is used.</para>
305
306 <para><literal>flush</literal> will cause all queued jobs to
307 be canceled when the new job is enqueued.</para>
308
309 <para>If <literal>ignore-dependencies</literal> is specified,
310 then all unit dependencies are ignored for this new job and
311 the operation is executed immediately. If passed, no required
312 units of the unit passed will be pulled in, and no ordering
313 dependencies will be honored. This is mostly a debugging and
314 rescue tool for the administrator and should not be used by
315 applications.</para>
316
317 <para><literal>ignore-requirements</literal> is similar to
318 <literal>ignore-dependencies</literal>, but only causes the
319 requirement dependencies to be ignored, the ordering
320 dependencies will still be honored.</para>
321 </listitem>
322
323 </varlistentry>
324
325 <varlistentry>
326 <term><option>--fail</option></term>
327
328 <listitem>
329 <para>Shorthand for <option>--job-mode=</option>fail.</para>
330 <para>When used with the <command>kill</command> command,
331 if no units were killed, the operation results in an error.
332 </para>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry>
337 <term><option>-i</option></term>
338 <term><option>--ignore-inhibitors</option></term>
339
340 <listitem>
341 <para>When system shutdown or a sleep state is requested,
342 ignore inhibitor locks. Applications can establish inhibitor
343 locks to avoid that certain important operations (such as CD
344 burning or suchlike) are interrupted by system shutdown or a
345 sleep state. Any user may take these locks and privileged
346 users may override these locks. If any locks are taken,
347 shutdown and sleep state requests will normally fail
348 (regardless of whether privileged or not) and a list of active locks
349 is printed. However, if <option>--ignore-inhibitors</option>
350 is specified, the locks are ignored and not printed, and the
351 operation attempted anyway, possibly requiring additional
352 privileges.</para>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry>
357 <term><option>-q</option></term>
358 <term><option>--quiet</option></term>
359
360 <listitem>
361 <para>Suppress printing of the results of various commands
362 and also the hints about truncated log lines. This does not
363 suppress output of commands for which the printed output is
364 the only result (like <command>show</command>). Errors are
365 always printed.</para>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry>
370 <term><option>--no-block</option></term>
371
372 <listitem>
373 <para>Do not synchronously wait for the requested operation
374 to finish. If this is not specified, the job will be
375 verified, enqueued and <command>systemctl</command> will
376 wait until the unit's start-up is completed. By passing this
377 argument, it is only verified and enqueued. This option may not be
378 combined with <option>--wait</option>.</para>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry>
383 <term><option>--wait</option></term>
384
385 <listitem>
386 <para>Synchronously wait for started units to terminate again.
387 This option may not be combined with <option>--no-block</option>.
388 Note that this will wait forever if any given unit never terminates
389 (by itself or by getting stopped explicitly); particularly services
390 which use <literal>RemainAfterExit=yes</literal>.</para>
391 </listitem>
392 </varlistentry>
393
394 <xi:include href="user-system-options.xml" xpointer="user" />
395 <xi:include href="user-system-options.xml" xpointer="system" />
396
397 <varlistentry>
398 <term><option>--failed</option></term>
399
400 <listitem>
401 <para>List units in failed state. This is equivalent to
402 <option>--state=failed</option>.</para>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry>
407 <term><option>--no-wall</option></term>
408
409 <listitem>
410 <para>Do not send wall message before halt, power-off and reboot.</para>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry>
415 <term><option>--global</option></term>
416
417 <listitem>
418 <para>When used with <command>enable</command> and
419 <command>disable</command>, operate on the global user
420 configuration directory, thus enabling or disabling a unit
421 file globally for all future logins of all users.</para>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry>
426 <term><option>--no-reload</option></term>
427
428 <listitem>
429 <para>When used with <command>enable</command> and
430 <command>disable</command>, do not implicitly reload daemon
431 configuration after executing the changes.</para>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry>
436 <term><option>--no-ask-password</option></term>
437
438 <listitem>
439 <para>When used with <command>start</command> and related
440 commands, disables asking for passwords. Background services
441 may require input of a password or passphrase string, for
442 example to unlock system hard disks or cryptographic
443 certificates. Unless this option is specified and the
444 command is invoked from a terminal,
445 <command>systemctl</command> will query the user on the
446 terminal for the necessary secrets. Use this option to
447 switch this behavior off. In this case, the password must be
448 supplied by some other means (for example graphical password
449 agents) or the service might fail. This also disables
450 querying the user for authentication for privileged
451 operations.</para>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry>
456 <term><option>--kill-who=</option></term>
457
458 <listitem>
459 <para>When used with <command>kill</command>, choose which
460 processes to send a signal to. Must be one of
461 <option>main</option>, <option>control</option> or
462 <option>all</option> to select whether to kill only the main
463 process, the control process or all processes of the
464 unit. The main process of the unit is the one that defines
465 the life-time of it. A control process of a unit is one that
466 is invoked by the manager to induce state changes of it. For
467 example, all processes started due to the
468 <varname>ExecStartPre=</varname>,
469 <varname>ExecStop=</varname> or
470 <varname>ExecReload=</varname> settings of service units are
471 control processes. Note that there is only one control
472 process per unit at a time, as only one state change is
473 executed at a time. For services of type
474 <varname>Type=forking</varname>, the initial process started
475 by the manager for <varname>ExecStart=</varname> is a
476 control process, while the process ultimately forked off by
477 that one is then considered the main process of the unit (if
478 it can be determined). This is different for service units
479 of other types, where the process forked off by the manager
480 for <varname>ExecStart=</varname> is always the main process
481 itself. A service unit consists of zero or one main process,
482 zero or one control process plus any number of additional
483 processes. Not all unit types manage processes of these
484 types however. For example, for mount units, control processes
485 are defined (which are the invocations of
486 <filename>&MOUNT_PATH;</filename> and
487 <filename>&UMOUNT_PATH;</filename>), but no main process
488 is defined. If omitted, defaults to
489 <option>all</option>.</para>
490 </listitem>
491
492 </varlistentry>
493
494 <varlistentry>
495 <term><option>-s</option></term>
496 <term><option>--signal=</option></term>
497
498 <listitem>
499 <para>When used with <command>kill</command>, choose which
500 signal to send to selected processes. Must be one of the
501 well-known signal specifiers such as <constant>SIGTERM</constant>, <constant>SIGINT</constant> or
502 <constant>SIGSTOP</constant>. If omitted, defaults to
503 <option>SIGTERM</option>.</para>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry>
508 <term><option>-f</option></term>
509 <term><option>--force</option></term>
510
511 <listitem>
512 <para>When used with <command>enable</command>, overwrite
513 any existing conflicting symlinks.</para>
514
515 <para>When used with <command>edit</command>, create all of the
516 specified units which do not already exist.</para>
517
518 <para>When used with <command>halt</command>, <command>poweroff</command>, <command>reboot</command> or
519 <command>kexec</command>, execute the selected operation without shutting down all units. However, all
520 processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a
521 drastic but relatively safe option to request an immediate reboot. If <option>--force</option> is specified
522 twice for these operations (with the exception of <command>kexec</command>), they will be executed
523 immediately, without terminating any processes or unmounting any file systems. Warning: specifying
524 <option>--force</option> twice with any of these operations might result in data loss. Note that when
525 <option>--force</option> is specified twice the selected operation is executed by
526 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
527 succeed even when the system manager has crashed.</para>
528 </listitem>
529 </varlistentry>
530
531 <varlistentry>
532 <term><option>--message=</option></term>
533
534 <listitem>
535 <para>When used with <command>halt</command>, <command>poweroff</command> or <command>reboot</command>, set a
536 short message explaining the reason for the operation. The message will be logged together with the default
537 shutdown message.</para>
538 </listitem>
539 </varlistentry>
540
541 <varlistentry>
542 <term><option>--now</option></term>
543
544 <listitem>
545 <para>When used with <command>enable</command>, the units
546 will also be started. When used with <command>disable</command> or
547 <command>mask</command>, the units will also be stopped. The start
548 or stop operation is only carried out when the respective enable or
549 disable operation has been successful.</para>
550 </listitem>
551 </varlistentry>
552
553 <varlistentry>
554 <term><option>--root=</option></term>
555
556 <listitem>
557 <para>When used with
558 <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
559 (and related commands), use the specified root path when looking for unit
560 files. If this option is present, <command>systemctl</command> will operate on
561 the file system directly, instead of communicating with the <command>systemd</command>
562 daemon to carry out changes.</para>
563 </listitem>
564
565 </varlistentry>
566
567 <varlistentry>
568 <term><option>--runtime</option></term>
569
570 <listitem>
571 <para>When used with <command>enable</command>,
572 <command>disable</command>, <command>edit</command>,
573 (and related commands), make changes only temporarily, so
574 that they are lost on the next reboot. This will have the
575 effect that changes are not made in subdirectories of
576 <filename>/etc</filename> but in <filename>/run</filename>,
577 with identical immediate effects, however, since the latter
578 is lost on reboot, the changes are lost too.</para>
579
580 <para>Similarly, when used with
581 <command>set-property</command>, make changes only
582 temporarily, so that they are lost on the next
583 reboot.</para>
584 </listitem>
585 </varlistentry>
586
587 <varlistentry>
588 <term><option>--preset-mode=</option></term>
589
590 <listitem>
591 <para>Takes one of <literal>full</literal> (the default),
592 <literal>enable-only</literal>,
593 <literal>disable-only</literal>. When used with the
594 <command>preset</command> or <command>preset-all</command>
595 commands, controls whether units shall be disabled and
596 enabled according to the preset rules, or only enabled, or
597 only disabled.</para>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry>
602 <term><option>-n</option></term>
603 <term><option>--lines=</option></term>
604
605 <listitem>
606 <para>When used with <command>status</command>, controls the
607 number of journal lines to show, counting from the most
608 recent ones. Takes a positive integer argument. Defaults to
609 10.</para>
610 </listitem>
611 </varlistentry>
612
613 <varlistentry>
614 <term><option>-o</option></term>
615 <term><option>--output=</option></term>
616
617 <listitem>
618 <para>When used with <command>status</command>, controls the
619 formatting of the journal entries that are shown. For the
620 available choices, see
621 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
622 Defaults to <literal>short</literal>.</para>
623 </listitem>
624 </varlistentry>
625
626 <varlistentry>
627 <term><option>--firmware-setup</option></term>
628
629 <listitem>
630 <para>When used with the <command>reboot</command> command,
631 indicate to the system's firmware to boot into setup
632 mode. Note that this is currently only supported on some EFI
633 systems and only if the system was booted in EFI
634 mode.</para>
635 </listitem>
636 </varlistentry>
637
638 <varlistentry>
639 <term><option>--plain</option></term>
640
641 <listitem>
642 <para>When used with <command>list-dependencies</command>,
643 <command>list-units</command> or <command>list-machines</command>,
644 the output is printed as a list instead of a tree, and the bullet
645 circles are omitted.</para>
646 </listitem>
647 </varlistentry>
648
649 <xi:include href="user-system-options.xml" xpointer="host" />
650 <xi:include href="user-system-options.xml" xpointer="machine" />
651
652 <xi:include href="standard-options.xml" xpointer="no-pager" />
653 <xi:include href="standard-options.xml" xpointer="no-legend" />
654 <xi:include href="standard-options.xml" xpointer="help" />
655 <xi:include href="standard-options.xml" xpointer="version" />
656 </variablelist>
657 </refsect1>
658
659 <refsect1>
660 <title>Commands</title>
661
662 <para>The following commands are understood:</para>
663
664 <refsect2>
665 <title>Unit Commands</title>
666
667 <variablelist>
668 <varlistentry>
669 <term><command>list-units <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
670
671 <listitem>
672 <para>List units that <command>systemd</command> currently has in memory. This includes units that are
673 either referenced directly or through a dependency, units that are pinned by applications programmatically,
674 or units that were active in the past and have failed. By default only units which are active, have pending
675 jobs, or have failed are shown; this can be changed with option <option>--all</option>. If one or more
676 <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown. The units
677 that are shown are additionally filtered by <option>--type=</option> and <option>--state=</option> if those
678 options are specified.</para>
679
680 <para>This is the default command.</para>
681 </listitem>
682 </varlistentry>
683
684 <varlistentry>
685 <term><command>list-sockets <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
686
687 <listitem>
688 <para>List socket units currently in memory, ordered by listening address. If one or more
689 <replaceable>PATTERN</replaceable>s are specified, only socket units matching one of them are
690 shown. Produces output similar to
691 <programlisting>
692 LISTEN UNIT ACTIVATES
693 /dev/initctl systemd-initctl.socket systemd-initctl.service
694 …
695 [::]:22 sshd.socket sshd.service
696 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
697
698 5 sockets listed.</programlisting>
699 Note: because the addresses might contains spaces, this output
700 is not suitable for programmatic consumption.
701 </para>
702
703 <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
704 </listitem>
705 </varlistentry>
706
707 <varlistentry>
708 <term><command>list-timers <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
709
710 <listitem>
711 <para>List timer units currently in memory, ordered by the time they elapse next. If one or more
712 <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown.
713 Produces output similar to
714 <programlisting>
715 NEXT LEFT LAST PASSED UNIT ACTIVATES
716 n/a n/a Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service
717 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
718 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
719 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
720 </programlisting>
721 </para>
722
723 <para><emphasis>NEXT</emphasis> shows the next time the timer will run.</para>
724 <para><emphasis>LEFT</emphasis> shows how long till the next time the timer runs.</para>
725 <para><emphasis>LAST</emphasis> shows the last time the timer ran.</para>
726 <para><emphasis>PASSED</emphasis> shows has long as passed since the timer laset ran.</para>
727 <para><emphasis>UNIT</emphasis> shows the name of the timer</para>
728 <para><emphasis>ACTIVATES</emphasis> shows the name the service the timer activates when it runs.</para>
729
730 <para>Also see <option>--all</option> and <option>--state=</option>.</para>
731 </listitem>
732 </varlistentry>
733
734 <varlistentry>
735 <term><command>start <replaceable>PATTERN</replaceable>…</command></term>
736
737 <listitem>
738 <para>Start (activate) one or more units specified on the
739 command line.</para>
740
741 <para>Note that glob patterns operate on the set of primary names of units currently in memory. Units which
742 are not active and are not in a failed state usually are not in memory, and will not be matched by any
743 pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until
744 the instance has been started. Therefore, using glob patterns with <command>start</command> has limited
745 usefulness. Also, secondary alias names of units are not considered.</para>
746 </listitem>
747 </varlistentry>
748 <varlistentry>
749 <term><command>stop <replaceable>PATTERN</replaceable>…</command></term>
750
751 <listitem>
752 <para>Stop (deactivate) one or more units specified on the
753 command line.</para>
754 </listitem>
755 </varlistentry>
756 <varlistentry>
757 <term><command>reload <replaceable>PATTERN</replaceable>…</command></term>
758
759 <listitem>
760 <para>Asks all units listed on the command line to reload
761 their configuration. Note that this will reload the
762 service-specific configuration, not the unit configuration
763 file of systemd. If you want systemd to reload the
764 configuration file of a unit, use the
765 <command>daemon-reload</command> command. In other words:
766 for the example case of Apache, this will reload Apache's
767 <filename>httpd.conf</filename> in the web server, not the
768 <filename>apache.service</filename> systemd unit
769 file.</para>
770
771 <para>This command should not be confused with the
772 <command>daemon-reload</command> command.</para>
773 </listitem>
774
775 </varlistentry>
776 <varlistentry>
777 <term><command>restart <replaceable>PATTERN</replaceable>…</command></term>
778
779 <listitem>
780 <para>Stop and then start one or more units specified on the
781 command line. If the units are not running yet, they will
782 be started.</para>
783 </listitem>
784 </varlistentry>
785 <varlistentry>
786 <term><command>try-restart <replaceable>PATTERN</replaceable>…</command></term>
787
788 <listitem>
789 <para>Stop and then start one or more units specified on the
790 command line if the units are running. This does nothing
791 if units are not running.</para>
792 <!-- Note that we don't document condrestart here, as that is just compatibility support, and we generally
793 don't document that. -->
794 </listitem>
795 </varlistentry>
796 <varlistentry>
797 <term><command>reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
798
799 <listitem>
800 <para>Reload one or more units if they support it. If not,
801 restart them instead. If the units are not running yet, they
802 will be started.</para>
803 </listitem>
804 </varlistentry>
805 <varlistentry>
806 <term><command>try-reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
807
808 <listitem>
809 <para>Reload one or more units if they support it. If not,
810 restart them instead. This does nothing if the units are not
811 running.</para>
812 <!-- Note that we don't document force-reload here, as that is just compatibility support, and we generally
813 don't document that. -->
814 </listitem>
815 </varlistentry>
816 <varlistentry>
817 <term><command>isolate <replaceable>NAME</replaceable></command></term>
818
819 <listitem>
820 <para>Start the unit specified on the command line and its dependencies
821 and stop all others, unless they have
822 <option>IgnoreOnIsolate=yes</option> (see
823 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
824 If a unit name with no extension is given, an extension of
825 <literal>.target</literal> will be assumed.</para>
826
827 <para>This is similar to changing the runlevel in a
828 traditional init system. The <command>isolate</command>
829 command will immediately stop processes that are not enabled
830 in the new unit, possibly including the graphical
831 environment or terminal you are currently using.</para>
832
833 <para>Note that this is allowed only on units where
834 <option>AllowIsolate=</option> is enabled. See
835 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
836 for details.</para>
837 </listitem>
838 </varlistentry>
839 <varlistentry>
840 <term><command>kill <replaceable>PATTERN</replaceable>…</command></term>
841
842 <listitem>
843 <para>Send a signal to one or more processes of the
844 unit. Use <option>--kill-who=</option> to select which
845 process to kill. Use <option>--signal=</option> to select
846 the signal to send.</para>
847 </listitem>
848 </varlistentry>
849 <varlistentry>
850 <term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
851
852 <listitem>
853 <para>Check whether any of the specified units are active
854 (i.e. running). Returns an exit code
855 <constant>0</constant> if at least one is active, or
856 non-zero otherwise. Unless <option>--quiet</option> is
857 specified, this will also print the current unit state to
858 standard output.</para>
859 </listitem>
860 </varlistentry>
861 <varlistentry>
862 <term><command>is-failed <replaceable>PATTERN</replaceable>…</command></term>
863
864 <listitem>
865 <para>Check whether any of the specified units are in a
866 "failed" state. Returns an exit code
867 <constant>0</constant> if at least one has failed,
868 non-zero otherwise. Unless <option>--quiet</option> is
869 specified, this will also print the current unit state to
870 standard output.</para>
871 </listitem>
872 </varlistentry>
873 <varlistentry>
874 <term><command>status</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…]</optional></term>
875
876 <listitem>
877 <para>Show terse runtime status information about one or
878 more units, followed by most recent log data from the
879 journal. If no units are specified, show system status. If
880 combined with <option>--all</option>, also show the status of
881 all units (subject to limitations specified with
882 <option>-t</option>). If a PID is passed, show information
883 about the unit the process belongs to.</para>
884
885 <para>This function is intended to generate human-readable
886 output. If you are looking for computer-parsable output,
887 use <command>show</command> instead. By default, this
888 function only shows 10 lines of output and ellipsizes
889 lines to fit in the terminal window. This can be changed
890 with <option>--lines</option> and <option>--full</option>,
891 see above. In addition, <command>journalctl
892 --unit=<replaceable>NAME</replaceable></command> or
893 <command>journalctl
894 --user-unit=<replaceable>NAME</replaceable></command> use
895 a similar filter for messages and might be more
896 convenient.
897 </para>
898
899 <para>Systemd implicitly loads units as necessary, so just running the <command>status</command> will
900 attempt to load a file. The command is thus not useful for determining if something was already loaded or
901 not. The units may possibly also be quickly unloaded after the operation is completed if there's no reason
902 to keep it in memory thereafter.
903 </para>
904
905 <example>
906 <title>Example output from systemctl status </title>
907
908 <programlisting>$ systemctl status bluetooth
909 â—Ź bluetooth.service - Bluetooth service
910 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
911 Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
912 Docs: man:bluetoothd(8)
913 Main PID: 930 (bluetoothd)
914 Status: "Running"
915 Tasks: 1
916 Memory: 648.0K
917 CPU: 435ms
918 CGroup: /system.slice/bluetooth.service
919 └─930 /usr/lib/bluetooth/bluetoothd
920
921 Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
922 Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
923 Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
924 </programlisting>
925
926 <para>The dot ("â—Ź") uses color on supported terminals to summarize the unit state at a glance. White
927 indicates an <literal>inactive</literal> or <literal>deactivating</literal> state. Red indicates a
928 <literal>failed</literal> or <literal>error</literal> state and green indicates an
929 <literal>active</literal>, <literal>reloading</literal> or <literal>activating</literal> state.
930 </para>
931
932 <para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been loaded into
933 memory. Other possible values for "Loaded:" include: <literal>error</literal> if there was a problem
934 loading it, <literal>not-found</literal>, and <literal>masked</literal>. Along with showing the path to
935 the unit file, this line will also show the enablement state. Enabled commands start at boot. See the
936 full table of possible enablement states — including the definition of <literal>masked</literal> — in the
937 documentation for the <command>is-enabled</command> command.
938 </para>
939
940 <para>The "Active:" line shows active state. The value is usually <literal>active</literal> or
941 <literal>inactive</literal>. Active could mean started, bound, plugged in, etc depending on the unit type.
942 The unit could also be in process of changing states, reporting a state of <literal>activating</literal> or
943 <literal>deactivating</literal>. A special <literal>failed</literal> state is entered when the service
944 failed in some way, such as a crash, exiting with an error code or timing out. If the failed state is
945 entered the cause will be logged for later reference.</para>
946 </example>
947
948 </listitem>
949 </varlistentry>
950 <varlistentry>
951 <term><command>show</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>JOB</replaceable>…</optional></term>
952
953 <listitem>
954 <para>Show properties of one or more units, jobs, or the manager itself. If no argument is specified,
955 properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and
956 if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use
957 <option>--all</option> to show those too. To select specific properties to show, use
958 <option>--property=</option>. This command is intended to be used whenever computer-parsable output is
959 required. Use <command>status</command> if you are looking for formatted human-readable output.</para>
960
961 <para>Many properties shown by <command>systemctl show</command> map directly to configuration settings of
962 the system and service manager and its unit files. Note that the properties shown by the command are
963 generally more low-level, normalized versions of the original configuration settings and expose runtime
964 state in addition to configuration. For example, properties shown for service units include the service's
965 current main process identifier as <literal>MainPID</literal> (which is runtime state), and time settings
966 are always exposed as properties ending in the <literal>…USec</literal> suffix even if a matching
967 configuration options end in <literal>…Sec</literal>, because microseconds is the normalized time unit used
968 by the system and service manager.</para>
969 </listitem>
970 </varlistentry>
971 <varlistentry>
972 <term><command>cat <replaceable>PATTERN</replaceable>…</command></term>
973
974 <listitem>
975 <para>Show backing files of one or more units. Prints the
976 "fragment" and "drop-ins" (source files) of units. Each
977 file is preceded by a comment which includes the file
978 name. Note that this shows the contents of the backing files
979 on disk, which may not match the system manager's
980 understanding of these units if any unit files were
981 updated on disk and the <command>daemon-reload</command>
982 command wasn't issued since.</para>
983 </listitem>
984 </varlistentry>
985 <varlistentry>
986 <term><command>set-property <replaceable>NAME</replaceable> <replaceable>ASSIGNMENT</replaceable>…</command></term>
987
988 <listitem>
989 <para>Set the specified unit properties at runtime where
990 this is supported. This allows changing configuration
991 parameter properties such as resource control settings at
992 runtime. Not all properties may be changed at runtime, but
993 many resource control settings (primarily those in
994 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
995 may. The changes are applied instantly, and stored on disk
996 for future boots, unless <option>--runtime</option> is
997 passed, in which case the settings only apply until the
998 next reboot. The syntax of the property assignment follows
999 closely the syntax of assignments in unit files.</para>
1000
1001 <para>Example: <command>systemctl set-property foobar.service CPUShares=777</command></para>
1002
1003 <para>If the specified unit appears to be inactive, the
1004 changes will be only stored on disk as described
1005 previously hence they will be effective when the unit will
1006 be started.</para>
1007
1008 <para>Note that this command allows changing multiple
1009 properties at the same time, which is preferable over
1010 setting them individually. Like unit file configuration
1011 settings, assigning the empty list to list parameters will
1012 reset the list.</para>
1013 </listitem>
1014 </varlistentry>
1015
1016 <varlistentry>
1017 <term><command>help <replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…</command></term>
1018
1019 <listitem>
1020 <para>Show manual pages for one or more units, if
1021 available. If a PID is given, the manual pages for the unit
1022 the process belongs to are shown.</para>
1023 </listitem>
1024 </varlistentry>
1025
1026 <varlistentry>
1027 <term><command>reset-failed [<replaceable>PATTERN</replaceable>…]</command></term>
1028
1029 <listitem>
1030 <para>Reset the <literal>failed</literal> state of the
1031 specified units, or if no unit name is passed, reset the state of all
1032 units. When a unit fails in some way (i.e. process exiting
1033 with non-zero error code, terminating abnormally or timing
1034 out), it will automatically enter the
1035 <literal>failed</literal> state and its exit code and status
1036 is recorded for introspection by the administrator until the
1037 service is restarted or reset with this command.</para>
1038 </listitem>
1039 </varlistentry>
1040
1041 <varlistentry>
1042 <term>
1043 <command>list-dependencies</command>
1044 <optional><replaceable>NAME</replaceable></optional>
1045 </term>
1046
1047 <listitem>
1048 <para>Shows units required and wanted by the specified
1049 unit. This recursively lists units following the
1050 <varname>Requires=</varname>,
1051 <varname>Requisite=</varname>,
1052 <varname>ConsistsOf=</varname>,
1053 <varname>Wants=</varname>, <varname>BindsTo=</varname>
1054 dependencies. If no unit is specified,
1055 <filename>default.target</filename> is implied.</para>
1056
1057 <para>By default, only target units are recursively
1058 expanded. When <option>--all</option> is passed, all other
1059 units are recursively expanded as well.</para>
1060
1061 <para>Options <option>--reverse</option>,
1062 <option>--after</option>, <option>--before</option>
1063 may be used to change what types of dependencies
1064 are shown.</para>
1065 </listitem>
1066 </varlistentry>
1067 </variablelist>
1068 </refsect2>
1069
1070 <refsect2>
1071 <title>Unit File Commands</title>
1072
1073 <variablelist>
1074 <varlistentry>
1075 <term><command>list-unit-files <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1076
1077 <listitem>
1078 <para>List unit files installed on the system, in combination with their enablement state (as reported by
1079 <command>is-enabled</command>). If one or more <replaceable>PATTERN</replaceable>s are specified, only unit
1080 files whose name matches one of them are shown (patterns matching unit file system paths are not
1081 supported).</para>
1082 </listitem>
1083 </varlistentry>
1084
1085 <varlistentry>
1086 <term><command>enable <replaceable>NAME</replaceable>…</command></term>
1087 <term><command>enable <replaceable>PATH</replaceable>…</command></term>
1088
1089 <listitem>
1090 <para>Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the
1091 <literal>[Install]</literal> sections of the indicated unit files. After the symlinks have been created,
1092 the system manager configuration is reloaded (in a way equivalent to <command>daemon-reload</command>), in
1093 order to ensure the changes are taken into account immediately. Note that this does
1094 <emphasis>not</emphasis> have the effect of also starting any of the units being enabled. If this is
1095 desired, combine this command with the <option>--now</option> switch, or invoke <command>start</command>
1096 with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of
1097 the form <filename>foo@bar.service</filename>), symlinks named the same as instances are created in the
1098 unit configuration directory, however they point to the single template unit file they are instantiated
1099 from.</para>
1100
1101 <para>This command expects either valid unit names (in which case various unit file directories are
1102 automatically searched for unit files with appropriate names), or absolute paths to unit files (in which
1103 case these files are read directly). If a specified unit file is located outside of the usual unit file
1104 directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring
1105 it is found when requested by commands such as <command>start</command>.</para>
1106
1107 <para>This command will print the file system operations executed. This output may be suppressed by passing
1108 <option>--quiet</option>.
1109 </para>
1110
1111 <para>Note that this operation creates only the symlinks suggested in the <literal>[Install]</literal>
1112 section of the unit files. While this command is the recommended way to manipulate the unit configuration
1113 directory, the administrator is free to make additional changes manually by placing or removing symlinks
1114 below this directory. This is particularly useful to create configurations that deviate from the suggested
1115 default installation. In this case, the administrator must make sure to invoke
1116 <command>daemon-reload</command> manually as necessary, in order to ensure the changes are taken into
1117 account.
1118 </para>
1119
1120 <para>Enabling units should not be confused with starting (activating) units, as done by the
1121 <command>start</command> command. Enabling and starting units is orthogonal: units may be enabled without
1122 being started and started without being enabled. Enabling simply hooks the unit into various suggested
1123 places (for example, so that the unit is automatically started on boot or when a particular kind of
1124 hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds
1125 the socket (in case of socket units), and so on.</para>
1126
1127 <para>Depending on whether <option>--system</option>, <option>--user</option>, <option>--runtime</option>,
1128 or <option>--global</option> is specified, this enables the unit for the system, for the calling user only,
1129 for only this boot of the system, or for all future logins of all users. Note that in the last case, no
1130 systemd daemon configuration is reloaded.</para>
1131
1132 <para>Using <command>enable</command> on masked units is not supported and results in an error.</para>
1133 </listitem>
1134 </varlistentry>
1135
1136 <varlistentry>
1137 <term><command>disable <replaceable>NAME</replaceable>…</command></term>
1138
1139 <listitem>
1140 <para>Disables one or more units. This removes all symlinks to the unit files backing the specified units
1141 from the unit configuration directory, and hence undoes any changes made by <command>enable</command> or
1142 <command>link</command>. Note that this removes <emphasis>all</emphasis> symlinks to matching unit files,
1143 including manually created symlinks, and not just those actually created by <command>enable</command> or
1144 <command>link</command>. Note that while <command>disable</command> undoes the effect of
1145 <command>enable</command>, the two commands are otherwise not symmetric, as <command>disable</command> may
1146 remove more symlinks than a prior <command>enable</command> invocation of the same unit created.</para>
1147
1148 <para>This command expects valid unit names only, it does not accept paths to unit files.</para>
1149
1150 <para>In addition to the units specified as arguments, all units are disabled that are listed in the
1151 <varname>Also=</varname> setting contained in the <literal>[Install]</literal> section of any of the unit
1152 files being operated on.</para>
1153
1154 <para>This command implicitly reloads the system manager configuration after completing the operation. Note
1155 that this command does not implicitly stop the units that are being disabled. If this is desired, either
1156 combine this command with the <option>--now</option> switch, or invoke the <command>stop</command> command
1157 with appropriate arguments later.</para>
1158
1159 <para>This command will print information about the file system operations (symlink removals)
1160 executed. This output may be suppressed by passing <option>--quiet</option>.
1161 </para>
1162
1163 <para>This command honors <option>--system</option>, <option>--user</option>, <option>--runtime</option>
1164 and <option>--global</option> in a similar way as <command>enable</command>.</para>
1165 </listitem>
1166 </varlistentry>
1167
1168 <varlistentry>
1169 <term><command>reenable <replaceable>NAME</replaceable>…</command></term>
1170
1171 <listitem>
1172 <para>Reenable one or more units, as specified on the command line. This is a combination of
1173 <command>disable</command> and <command>enable</command> and is useful to reset the symlinks a unit file is
1174 enabled with to the defaults configured in its <literal>[Install]</literal> section. This command expects
1175 a unit name only, it does not accept paths to unit files.</para>
1176 </listitem>
1177 </varlistentry>
1178
1179 <varlistentry>
1180 <term><command>preset <replaceable>NAME</replaceable>…</command></term>
1181
1182 <listitem>
1183 <para>Reset the enable/disable status one or more unit files, as specified on
1184 the command line, to the defaults configured in the preset policy files. This
1185 has the same effect as <command>disable</command> or
1186 <command>enable</command>, depending how the unit is listed in the preset
1187 files.</para>
1188
1189 <para>Use <option>--preset-mode=</option> to control whether units shall be
1190 enabled and disabled, or only enabled, or only disabled.</para>
1191
1192 <para>If the unit carries no install information, it will be silently ignored
1193 by this command. <replaceable>NAME</replaceable> must be the real unit name,
1194 any alias names are ignored silently.</para>
1195
1196 <para>For more information on the preset policy format, see
1197 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1198 For more information on the concept of presets, please consult the
1199 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
1200 document.</para>
1201 </listitem>
1202 </varlistentry>
1203
1204 <varlistentry>
1205 <term><command>preset-all</command></term>
1206
1207 <listitem>
1208 <para>Resets all installed unit files to the defaults
1209 configured in the preset policy file (see above).</para>
1210
1211 <para>Use <option>--preset-mode=</option> to control
1212 whether units shall be enabled and disabled, or only
1213 enabled, or only disabled.</para>
1214 </listitem>
1215 </varlistentry>
1216
1217 <varlistentry>
1218 <term><command>is-enabled <replaceable>NAME</replaceable>…</command></term>
1219
1220 <listitem>
1221 <para>Checks whether any of the specified unit files are
1222 enabled (as with <command>enable</command>). Returns an
1223 exit code of 0 if at least one is enabled, non-zero
1224 otherwise. Prints the current enable status (see table).
1225 To suppress this output, use <option>--quiet</option>.
1226 To show installation targets, use <option>--full</option>.
1227 </para>
1228
1229 <table>
1230 <title>
1231 <command>is-enabled</command> output
1232 </title>
1233
1234 <tgroup cols='3'>
1235 <thead>
1236 <row>
1237 <entry>Name</entry>
1238 <entry>Description</entry>
1239 <entry>Exit Code</entry>
1240 </row>
1241 </thead>
1242 <tbody>
1243 <row>
1244 <entry><literal>enabled</literal></entry>
1245 <entry morerows='1'>Enabled via <filename>.wants/</filename>, <filename>.requires/</filename> or <varname>Alias=</varname> symlinks (permanently in <filename>/etc/systemd/system/</filename>, or transiently in <filename>/run/systemd/system/</filename>).</entry>
1246 <entry morerows='1'>0</entry>
1247 </row>
1248 <row>
1249 <entry><literal>enabled-runtime</literal></entry>
1250 </row>
1251 <row>
1252 <entry><literal>linked</literal></entry>
1253 <entry morerows='1'>Made available through one or more symlinks to the unit file (permanently in <filename>/etc/systemd/system/</filename> or transiently in <filename>/run/systemd/system/</filename>), even though the unit file might reside outside of the unit file search path.</entry>
1254 <entry morerows='1'>&gt; 0</entry>
1255 </row>
1256 <row>
1257 <entry><literal>linked-runtime</literal></entry>
1258 </row>
1259 <row>
1260 <entry><literal>masked</literal></entry>
1261 <entry morerows='1'>Completely disabled, so that any start operation on it fails (permanently in <filename>/etc/systemd/system/</filename> or transiently in <filename>/run/systemd/systemd/</filename>).</entry>
1262 <entry morerows='1'>&gt; 0</entry>
1263 </row>
1264 <row>
1265 <entry><literal>masked-runtime</literal></entry>
1266 </row>
1267 <row>
1268 <entry><literal>static</literal></entry>
1269 <entry>The unit file is not enabled, and has no provisions for enabling in the <literal>[Install]</literal> unit file section.</entry>
1270 <entry>0</entry>
1271 </row>
1272 <row>
1273 <entry><literal>indirect</literal></entry>
1274 <entry>The unit file itself is not enabled, but it has a non-empty <varname>Also=</varname> setting in the <literal>[Install]</literal> 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 Also=. For template unit file, an instance different than the one specified in <varname>DefaultInstance=</varname> is enabled.</entry>
1275 <entry>0</entry>
1276 </row>
1277 <row>
1278 <entry><literal>disabled</literal></entry>
1279 <entry>The unit file is not enabled, but contains an <literal>[Install]</literal> section with installation instructions.</entry>
1280 <entry>&gt; 0</entry>
1281 </row>
1282 <row>
1283 <entry><literal>generated</literal></entry>
1284 <entry>The unit file was generated dynamically via a generator tool. See <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Generated unit files may not be enabled, they are enabled implicitly by their generator.</entry>
1285 <entry>0</entry>
1286 </row>
1287 <row>
1288 <entry><literal>transient</literal></entry>
1289 <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.</entry>
1290 <entry>0</entry>
1291 </row>
1292 <row>
1293 <entry><literal>bad</literal></entry>
1294 <entry>The unit file is invalid or another error occurred. Note that <command>is-enabled</command> will not actually return this state, but print an error message instead. However the unit file listing printed by <command>list-unit-files</command> might show it.</entry>
1295 <entry>&gt; 0</entry>
1296 </row>
1297 </tbody>
1298 </tgroup>
1299 </table>
1300
1301 </listitem>
1302 </varlistentry>
1303
1304 <varlistentry>
1305 <term><command>mask <replaceable>NAME</replaceable>…</command></term>
1306
1307 <listitem>
1308 <para>Mask one or more units, as specified on the command line. This will link these unit files to
1309 <filename>/dev/null</filename>, making it impossible to start them. This is a stronger version of
1310 <command>disable</command>, since it prohibits all kinds of activation of the unit, including enablement
1311 and manual activation. Use this option with care. This honors the <option>--runtime</option> option to only
1312 mask temporarily until the next reboot of the system. The <option>--now</option> option may be used to
1313 ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit
1314 file paths.</para>
1315 </listitem>
1316 </varlistentry>
1317
1318 <varlistentry>
1319 <term><command>unmask <replaceable>NAME</replaceable>…</command></term>
1320
1321 <listitem>
1322 <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
1323 <command>mask</command>. This command expects valid unit names only, it does not accept unit file
1324 paths.</para>
1325 </listitem>
1326 </varlistentry>
1327
1328 <varlistentry>
1329 <term><command>link <replaceable>PATH</replaceable>…</command></term>
1330
1331 <listitem>
1332 <para>Link a unit file that is not in the unit file search paths into the unit file search path. This
1333 command expects an absolute path to a unit file. The effect of this may be undone with
1334 <command>disable</command>. The effect of this command is that a unit file is made available for commands
1335 such as <command>start</command>, even though it is not installed directly in the unit search path.</para>
1336 </listitem>
1337 </varlistentry>
1338
1339 <varlistentry>
1340 <term><command>revert <replaceable>NAME</replaceable>…</command></term>
1341
1342 <listitem>
1343 <para>Revert one or more unit files to their vendor versions. This command removes drop-in configuration
1344 files that modify the specified units, as well as any user-configured unit file that overrides a matching
1345 vendor supplied unit file. Specifically, for a unit <literal>foo.service</literal> the matching directories
1346 <literal>foo.service.d/</literal> with all their contained files are removed, both below the persistent and
1347 runtime configuration directories (i.e. below <filename>/etc/systemd/system</filename> and
1348 <filename>/run/systemd/system</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
1349 located below <filename>/usr</filename>) any matching persistent or runtime unit file that overrides it is
1350 removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below
1351 <filename>/etc/systemd/system</filename> or <filename>/run/systemd/system</filename>, but not in a unit
1352 file stored below <filename>/usr</filename>), then it is not removed. Also, if a unit is masked, it is
1353 unmasked.</para>
1354
1355 <para>Effectively, this command may be used to undo all changes made with <command>systemctl
1356 edit</command>, <command>systemctl set-property</command> and <command>systemctl mask</command> and puts
1357 the original unit file with its settings back in effect.</para>
1358 </listitem>
1359 </varlistentry>
1360
1361 <varlistentry>
1362 <term><command>add-wants <replaceable>TARGET</replaceable>
1363 <replaceable>NAME</replaceable>…</command></term>
1364 <term><command>add-requires <replaceable>TARGET</replaceable>
1365 <replaceable>NAME</replaceable>…</command></term>
1366
1367 <listitem>
1368 <para>Adds <literal>Wants=</literal> or <literal>Requires=</literal>
1369 dependencies, respectively, to the specified
1370 <replaceable>TARGET</replaceable> for one or more units. </para>
1371
1372 <para>This command honors <option>--system</option>,
1373 <option>--user</option>, <option>--runtime</option> and
1374 <option>--global</option> in a way similar to
1375 <command>enable</command>.</para>
1376
1377 </listitem>
1378 </varlistentry>
1379
1380 <varlistentry>
1381 <term><command>edit <replaceable>NAME</replaceable>…</command></term>
1382
1383 <listitem>
1384 <para>Edit a drop-in snippet or a whole replacement file if
1385 <option>--full</option> is specified, to extend or override the
1386 specified unit.</para>
1387
1388 <para>Depending on whether <option>--system</option> (the default),
1389 <option>--user</option>, or <option>--global</option> is specified,
1390 this command creates a drop-in file for each unit either for the system,
1391 for the calling user, or for all futures logins of all users. Then,
1392 the editor (see the "Environment" section below) is invoked on
1393 temporary files which will be written to the real location if the
1394 editor exits successfully.</para>
1395
1396 <para>If <option>--full</option> is specified, this will copy the
1397 original units instead of creating drop-in files.</para>
1398
1399 <para>If <option>--force</option> is specified and any units do
1400 not already exist, new unit files will be opened for editing.</para>
1401
1402 <para>If <option>--runtime</option> is specified, the changes will
1403 be made temporarily in <filename>/run</filename> and they will be
1404 lost on the next reboot.</para>
1405
1406 <para>If the temporary file is empty upon exit, the modification of
1407 the related unit is canceled.</para>
1408
1409 <para>After the units have been edited, systemd configuration is
1410 reloaded (in a way that is equivalent to <command>daemon-reload</command>).
1411 </para>
1412
1413 <para>Note that this command cannot be used to remotely edit units
1414 and that you cannot temporarily edit units which are in
1415 <filename>/etc</filename>, since they take precedence over
1416 <filename>/run</filename>.</para>
1417 </listitem>
1418 </varlistentry>
1419
1420 <varlistentry>
1421 <term><command>get-default</command></term>
1422
1423 <listitem>
1424 <para>Return the default target to boot into. This returns
1425 the target unit name <filename>default.target</filename>
1426 is aliased (symlinked) to.</para>
1427 </listitem>
1428 </varlistentry>
1429
1430 <varlistentry>
1431 <term><command>set-default <replaceable>NAME</replaceable></command></term>
1432
1433 <listitem>
1434 <para>Set the default target to boot into. This sets
1435 (symlinks) the <filename>default.target</filename> alias
1436 to the given target unit.</para>
1437 </listitem>
1438 </varlistentry>
1439
1440 </variablelist>
1441 </refsect2>
1442
1443 <refsect2>
1444 <title>Machine Commands</title>
1445
1446 <variablelist>
1447 <varlistentry>
1448 <term><command>list-machines <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
1449
1450 <listitem>
1451 <para>List the host and all running local containers with
1452 their state. If one or more
1453 <replaceable>PATTERN</replaceable>s are specified, only
1454 containers matching one of them are shown.
1455 </para>
1456 </listitem>
1457 </varlistentry>
1458 </variablelist>
1459 </refsect2>
1460
1461 <refsect2>
1462 <title>Job Commands</title>
1463
1464 <variablelist>
1465 <varlistentry>
1466 <term><command>list-jobs <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1467
1468 <listitem>
1469 <para>List jobs that are in progress. If one or more
1470 <replaceable>PATTERN</replaceable>s are specified, only
1471 jobs for units matching one of them are shown.</para>
1472
1473 <para>When combined with <option>--after</option> or <option>--before</option> the list is augmented with
1474 information on which other job each job is waiting for, and which other jobs are waiting for it, see
1475 above.</para>
1476 </listitem>
1477 </varlistentry>
1478 <varlistentry>
1479 <term><command>cancel <replaceable>JOB</replaceable>…</command></term>
1480
1481 <listitem>
1482 <para>Cancel one or more jobs specified on the command line
1483 by their numeric job IDs. If no job ID is specified, cancel
1484 all pending jobs.</para>
1485 </listitem>
1486 </varlistentry>
1487 </variablelist>
1488 </refsect2>
1489
1490 <refsect2>
1491 <title>Environment Commands</title>
1492
1493 <variablelist>
1494 <varlistentry>
1495 <term><command>show-environment</command></term>
1496
1497 <listitem>
1498 <para>Dump the systemd manager environment block. This is the environment
1499 block that is passed to all processes the manager spawns. The environment
1500 block will be dumped in straight-forward form suitable for sourcing into
1501 most shells. If no special characters or whitespace is present in the variable
1502 values, no escaping is performed, and the assignments have the form
1503 <literal>VARIABLE=value</literal>. If whitespace or characters which have
1504 special meaning to the shell are present, dollar-single-quote escaping is
1505 used, and assignments have the form <literal>VARIABLE=$'value'</literal>.
1506 This syntax is known to be supported by
1507 <citerefentry project='die-net'><refentrytitle>bash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1508 <citerefentry project='die-net'><refentrytitle>zsh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1509 <citerefentry project='die-net'><refentrytitle>ksh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1510 and
1511 <citerefentry project='die-net'><refentrytitle>busybox</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
1512 <citerefentry project='die-net'><refentrytitle>ash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1513 but not
1514 <citerefentry project='die-net'><refentrytitle>dash</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1515 or
1516 <citerefentry project='die-net'><refentrytitle>fish</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1517 </para>
1518 </listitem>
1519 </varlistentry>
1520 <varlistentry>
1521 <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
1522
1523 <listitem>
1524 <para>Set one or more systemd manager environment variables,
1525 as specified on the command line.</para>
1526 </listitem>
1527 </varlistentry>
1528 <varlistentry>
1529 <term><command>unset-environment <replaceable>VARIABLE</replaceable>…</command></term>
1530
1531 <listitem>
1532 <para>Unset one or more systemd manager environment
1533 variables. If only a variable name is specified, it will be
1534 removed regardless of its value. If a variable and a value
1535 are specified, the variable is only removed if it has the
1536 specified value.</para>
1537 </listitem>
1538 </varlistentry>
1539 <varlistentry>
1540 <term>
1541 <command>import-environment</command>
1542 <optional><replaceable>VARIABLE…</replaceable></optional>
1543 </term>
1544
1545 <listitem>
1546 <para>Import all, one or more environment variables set on
1547 the client into the systemd manager environment block. If
1548 no arguments are passed, the entire environment block is
1549 imported. Otherwise, a list of one or more environment
1550 variable names should be passed, whose client-side values
1551 are then imported into the manager's environment
1552 block.</para>
1553 </listitem>
1554 </varlistentry>
1555 </variablelist>
1556 </refsect2>
1557
1558 <refsect2>
1559 <title>Manager Lifecycle Commands</title>
1560
1561 <variablelist>
1562 <varlistentry>
1563 <term><command>daemon-reload</command></term>
1564
1565 <listitem>
1566 <para>Reload the systemd manager configuration. This will
1567 rerun all generators (see
1568 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1569 reload all unit files, and recreate the entire dependency
1570 tree. While the daemon is being reloaded, all sockets
1571 systemd listens on behalf of user configuration will stay
1572 accessible.</para>
1573
1574 <para>This command should not be confused with the
1575 <command>reload</command> command.</para>
1576 </listitem>
1577 </varlistentry>
1578 <varlistentry>
1579 <term><command>daemon-reexec</command></term>
1580
1581 <listitem>
1582 <para>Reexecute the systemd manager. This will serialize the
1583 manager state, reexecute the process and deserialize the
1584 state again. This command is of little use except for
1585 debugging and package upgrades. Sometimes, it might be
1586 helpful as a heavy-weight <command>daemon-reload</command>.
1587 While the daemon is being reexecuted, all sockets systemd listening
1588 on behalf of user configuration will stay accessible.
1589 </para>
1590 </listitem>
1591 </varlistentry>
1592 </variablelist>
1593 </refsect2>
1594
1595 <refsect2>
1596 <title>System Commands</title>
1597
1598 <variablelist>
1599 <varlistentry>
1600 <term><command>is-system-running</command></term>
1601
1602 <listitem>
1603 <para>Checks whether the system is operational. This
1604 returns success (exit code 0) when the system is fully up
1605 and running, specifically not in startup, shutdown or
1606 maintenance mode, and with no failed services. Failure is
1607 returned otherwise (exit code non-zero). In addition, the
1608 current state is printed in a short string to standard
1609 output, see the table below. Use <option>--quiet</option> to
1610 suppress this output.</para>
1611
1612 <table>
1613 <title><command>is-system-running</command> output</title>
1614 <tgroup cols='3'>
1615 <colspec colname='name'/>
1616 <colspec colname='description'/>
1617 <colspec colname='exit-code'/>
1618 <thead>
1619 <row>
1620 <entry>Name</entry>
1621 <entry>Description</entry>
1622 <entry>Exit Code</entry>
1623 </row>
1624 </thead>
1625 <tbody>
1626 <row>
1627 <entry><varname>initializing</varname></entry>
1628 <entry><para>Early bootup, before
1629 <filename>basic.target</filename> is reached
1630 or the <varname>maintenance</varname> state entered.
1631 </para></entry>
1632 <entry>&gt; 0</entry>
1633 </row>
1634 <row>
1635 <entry><varname>starting</varname></entry>
1636 <entry><para>Late bootup, before the job queue
1637 becomes idle for the first time, or one of the
1638 rescue targets are reached.</para></entry>
1639 <entry>&gt; 0</entry>
1640 </row>
1641 <row>
1642 <entry><varname>running</varname></entry>
1643 <entry><para>The system is fully
1644 operational.</para></entry>
1645 <entry>0</entry>
1646 </row>
1647 <row>
1648 <entry><varname>degraded</varname></entry>
1649 <entry><para>The system is operational but one or more
1650 units failed.</para></entry>
1651 <entry>&gt; 0</entry>
1652 </row>
1653 <row>
1654 <entry><varname>maintenance</varname></entry>
1655 <entry><para>The rescue or emergency target is
1656 active.</para></entry>
1657 <entry>&gt; 0</entry>
1658 </row>
1659 <row>
1660 <entry><varname>stopping</varname></entry>
1661 <entry><para>The manager is shutting
1662 down.</para></entry>
1663 <entry>&gt; 0</entry>
1664 </row>
1665 <row>
1666 <entry><varname>offline</varname></entry>
1667 <entry><para>The manager is not
1668 running. Specifically, this is the operational
1669 state if an incompatible program is running as
1670 system manager (PID 1).</para></entry>
1671 <entry>&gt; 0</entry>
1672 </row>
1673 <row>
1674 <entry><varname>unknown</varname></entry>
1675 <entry><para>The operational state could not be
1676 determined, due to lack of resources or another
1677 error cause.</para></entry>
1678 <entry>&gt; 0</entry>
1679 </row>
1680 </tbody>
1681 </tgroup>
1682 </table>
1683 </listitem>
1684 </varlistentry>
1685
1686 <varlistentry>
1687 <term><command>default</command></term>
1688
1689 <listitem>
1690 <para>Enter default mode. This is equivalent to <command>systemctl isolate default.target</command>. This
1691 operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1692 </listitem>
1693 </varlistentry>
1694
1695 <varlistentry>
1696 <term><command>rescue</command></term>
1697
1698 <listitem>
1699 <para>Enter rescue mode. This is equivalent to <command>systemctl isolate rescue.target</command>. This
1700 operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1701 </listitem>
1702 </varlistentry>
1703 <varlistentry>
1704 <term><command>emergency</command></term>
1705
1706 <listitem>
1707 <para>Enter emergency mode. This is equivalent to <command>systemctl isolate
1708 emergency.target</command>. This operation is blocking by default, use <option>--no-block</option> to
1709 request asynchronous behavior.</para>
1710 </listitem>
1711 </varlistentry>
1712 <varlistentry>
1713 <term><command>halt</command></term>
1714
1715 <listitem>
1716 <para>Shut down and halt the system. This is mostly equivalent to <command>systemctl start halt.target
1717 --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all users. This command is
1718 asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note
1719 that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered
1720 on. Use <command>systemctl poweroff</command> for powering off the system (see below).</para>
1721
1722 <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1723 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1724 system halt. If <option>--force</option> is specified twice, the operation is immediately executed without
1725 terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1726 <option>--force</option> is specified twice the halt operation is executed by <command>systemctl</command>
1727 itself, and the system manager is not contacted. This means the command should succeed even when the system
1728 manager has crashed.</para>
1729 </listitem>
1730 </varlistentry>
1731 <varlistentry>
1732 <term><command>poweroff</command></term>
1733
1734 <listitem>
1735 <para>Shut down and power-off the system. This is mostly equivalent to <command>systemctl start
1736 poweroff.target --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all
1737 users. This command is asynchronous; it will return after the power-off operation is enqueued, without
1738 waiting for it to complete.</para>
1739
1740 <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1741 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1742 powering off. If <option>--force</option> is specified twice, the operation is immediately executed without
1743 terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1744 <option>--force</option> is specified twice the power-off operation is executed by
1745 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1746 succeed even when the system manager has crashed.</para>
1747 </listitem>
1748 </varlistentry>
1749 <varlistentry>
1750 <term><command>reboot <optional><replaceable>arg</replaceable></optional></command></term>
1751
1752 <listitem>
1753 <para>Shut down and reboot the system. This is mostly equivalent to <command>systemctl start reboot.target
1754 --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all users. This
1755 command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
1756 complete.</para>
1757
1758 <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1759 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1760 reboot. If <option>--force</option> is specified twice, the operation is immediately executed without
1761 terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1762 <option>--force</option> is specified twice the reboot operation is executed by
1763 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1764 succeed even when the system manager has crashed.</para>
1765
1766 <para>If the optional argument <replaceable>arg</replaceable> is given, it will be passed as the optional
1767 argument to the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1768 system call. The value is architecture and firmware specific. As an example, <literal>recovery</literal>
1769 might be used to trigger system recovery, and <literal>fota</literal> might be used to trigger a
1770 <quote>firmware over the air</quote> update.</para>
1771 </listitem>
1772 </varlistentry>
1773
1774 <varlistentry>
1775 <term><command>kexec</command></term>
1776
1777 <listitem>
1778 <para>Shut down and reboot the system via <command>kexec</command>. This is equivalent to
1779 <command>systemctl start kexec.target --job-mode=replace-irreversibly --no-block</command>. This command is
1780 asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
1781 complete.</para>
1782
1783 <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1784 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1785 reboot.</para>
1786 </listitem>
1787 </varlistentry>
1788
1789 <varlistentry>
1790 <term><command>exit <optional><replaceable>EXIT_CODE</replaceable></optional></command></term>
1791
1792 <listitem>
1793 <para>Ask the service manager to quit. This is only supported for user service managers (i.e. in
1794 conjunction with the <option>--user</option> option) or in containers and is equivalent to
1795 <command>poweroff</command> otherwise. This command is asynchronous; it will return after the exit
1796 operation is enqueued, without waiting for it to complete.</para>
1797
1798 <para>The service manager will exit with the specified exit code, if
1799 <replaceable>EXIT_CODE</replaceable> is passed.</para>
1800 </listitem>
1801 </varlistentry>
1802
1803 <varlistentry>
1804 <term><command>switch-root <replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></command></term>
1805
1806 <listitem>
1807 <para>Switches to a different root directory and executes a new system manager process below it. This is
1808 intended for usage in initial RAM disks ("initrd"), and will transition from the initrd's system manager
1809 process (a.k.a. "init" process) to the main system manager process which is loaded from the actual host
1810 volume. This call takes two arguments: the directory that is to become the new root directory, and the path
1811 to the new system manager binary below it to execute as PID 1. If the latter is omitted or the empty
1812 string, a systemd binary will automatically be searched for and used as init. If the system manager path is
1813 omitted, equal to the empty string or identical to the path to the systemd binary, the state of the
1814 initrd's system manager process is passed to the main system manager, which allows later introspection of
1815 the state of the services involved in the initrd boot phase.</para>
1816 </listitem>
1817 </varlistentry>
1818
1819 <varlistentry>
1820 <term><command>suspend</command></term>
1821
1822 <listitem>
1823 <para>Suspend the system. This will trigger activation of the special target unit
1824 <filename>suspend.target</filename>. This command is asynchronous, and will return after the suspend
1825 operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.</para>
1826 </listitem>
1827 </varlistentry>
1828
1829 <varlistentry>
1830 <term><command>hibernate</command></term>
1831
1832 <listitem>
1833 <para>Hibernate the system. This will trigger activation of the special target unit
1834 <filename>hibernate.target</filename>. This command is asynchronous, and will return after the hibernation
1835 operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete.</para>
1836 </listitem>
1837 </varlistentry>
1838
1839 <varlistentry>
1840 <term><command>hybrid-sleep</command></term>
1841
1842 <listitem>
1843 <para>Hibernate and suspend the system. This will trigger activation of the special target unit
1844 <filename>hybrid-sleep.target</filename>. This command is asynchronous, and will return after the hybrid
1845 sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete.</para>
1846 </listitem>
1847 </varlistentry>
1848 </variablelist>
1849 </refsect2>
1850
1851 <refsect2>
1852 <title>Parameter Syntax</title>
1853
1854 <para>Unit commands listed above take either a single unit name (designated as <replaceable>NAME</replaceable>),
1855 or multiple unit specifications (designated as <replaceable>PATTERN</replaceable>…). In the first case, the
1856 unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"),
1857 systemctl will append a suitable suffix, <literal>.service</literal> by default, and a type-specific suffix in
1858 case of commands which operate only on specific unit types. For example,
1859 <programlisting># systemctl start sshd</programlisting> and
1860 <programlisting># systemctl start sshd.service</programlisting>
1861 are equivalent, as are
1862 <programlisting># systemctl isolate default</programlisting>
1863 and
1864 <programlisting># systemctl isolate default.target</programlisting>
1865 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1866 paths to mount unit names.
1867 <programlisting># systemctl status /dev/sda
1868 # systemctl status /home</programlisting>
1869 are equivalent to:
1870 <programlisting># systemctl status dev-sda.device
1871 # systemctl status home.mount</programlisting>
1872 In the second case, shell-style globs will be matched against the primary names of all units currently in memory;
1873 literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1874 names always refer to exactly one unit, but globs may match zero units and this is not considered an
1875 error.</para>
1876
1877 <para>Glob patterns use
1878 <citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1879 so normal shell-style globbing rules are used, and
1880 <literal>*</literal>, <literal>?</literal>,
1881 <literal>[]</literal> may be used. See
1882 <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1883 for more details. The patterns are matched against the primary names of
1884 units currently in memory, and patterns which do not match anything
1885 are silently skipped. For example:
1886 <programlisting># systemctl stop sshd@*.service</programlisting>
1887 will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that aren't
1888 in memory are not considered for glob expansion.
1889 </para>
1890
1891 <para>For unit file commands, the specified <replaceable>NAME</replaceable> should be the name of the unit file
1892 (possibly abbreviated, see above), or the absolute path to the unit file:
1893 <programlisting># systemctl enable foo.service</programlisting>
1894 or
1895 <programlisting># systemctl link /path/to/foo.service</programlisting>
1896 </para>
1897 </refsect2>
1898
1899 </refsect1>
1900
1901 <refsect1>
1902 <title>Exit status</title>
1903
1904 <para>On success, 0 is returned, a non-zero failure
1905 code otherwise.</para>
1906 </refsect1>
1907
1908 <refsect1>
1909 <title>Environment</title>
1910
1911 <variablelist class='environment-variables'>
1912 <varlistentry>
1913 <term><varname>$SYSTEMD_EDITOR</varname></term>
1914
1915 <listitem><para>Editor to use when editing units; overrides
1916 <varname>$EDITOR</varname> and <varname>$VISUAL</varname>. If neither
1917 <varname>$SYSTEMD_EDITOR</varname> nor <varname>$EDITOR</varname> nor
1918 <varname>$VISUAL</varname> are present or if it is set to an empty
1919 string or if their execution failed, systemctl will try to execute well
1920 known editors in this order:
1921 <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1922 <citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1923 <citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1924 <citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1925 </para></listitem>
1926 </varlistentry>
1927 </variablelist>
1928 <xi:include href="less-variables.xml" xpointer="pager"/>
1929 <xi:include href="less-variables.xml" xpointer="less"/>
1930 <xi:include href="less-variables.xml" xpointer="lesscharset"/>
1931 </refsect1>
1932
1933 <refsect1>
1934 <title>See Also</title>
1935 <para>
1936 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1937 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1938 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1939 <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1940 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1941 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1942 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1943 <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1944 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1945 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1946 <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1947 </para>
1948 </refsect1>
1949
1950 </refentry>