]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemctl.xml
Merge pull request #5213 from keszybz/systemctl-root-cat
[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.</para>
299
300 <para><literal>isolate</literal> is only valid for start
301 operations and causes all other units to be stopped when the
302 specified unit is started. This mode is always used when the
303 <command>isolate</command> command is used.</para>
304
305 <para><literal>flush</literal> will cause all queued jobs to
306 be canceled when the new job is enqueued.</para>
307
308 <para>If <literal>ignore-dependencies</literal> is specified,
309 then all unit dependencies are ignored for this new job and
310 the operation is executed immediately. If passed, no required
311 units of the unit passed will be pulled in, and no ordering
312 dependencies will be honored. This is mostly a debugging and
313 rescue tool for the administrator and should not be used by
314 applications.</para>
315
316 <para><literal>ignore-requirements</literal> is similar to
317 <literal>ignore-dependencies</literal>, but only causes the
318 requirement dependencies to be ignored, the ordering
319 dependencies will still be honored.</para>
320 </listitem>
321
322 </varlistentry>
323
324 <varlistentry>
325 <term><option>--fail</option></term>
326
327 <listitem>
328 <para>Shorthand for <option>--job-mode=</option>fail.</para>
329 <para>When used with the <command>kill</command> command,
330 if no units were killed, the operation results in an error.
331 </para>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry>
336 <term><option>-i</option></term>
337 <term><option>--ignore-inhibitors</option></term>
338
339 <listitem>
340 <para>When system shutdown or a sleep state is requested,
341 ignore inhibitor locks. Applications can establish inhibitor
342 locks to avoid that certain important operations (such as CD
343 burning or suchlike) are interrupted by system shutdown or a
344 sleep state. Any user may take these locks and privileged
345 users may override these locks. If any locks are taken,
346 shutdown and sleep state requests will normally fail
347 (regardless of whether privileged or not) and a list of active locks
348 is printed. However, if <option>--ignore-inhibitors</option>
349 is specified, the locks are ignored and not printed, and the
350 operation attempted anyway, possibly requiring additional
351 privileges.</para>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry>
356 <term><option>-q</option></term>
357 <term><option>--quiet</option></term>
358
359 <listitem>
360 <para>Suppress printing of the results of various commands
361 and also the hints about truncated log lines. This does not
362 suppress output of commands for which the printed output is
363 the only result (like <command>show</command>). Errors are
364 always printed.</para>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry>
369 <term><option>--no-block</option></term>
370
371 <listitem>
372 <para>Do not synchronously wait for the requested operation
373 to finish. If this is not specified, the job will be
374 verified, enqueued and <command>systemctl</command> will
375 wait until the unit's start-up is completed. By passing this
376 argument, it is only verified and enqueued. This option may not be
377 combined with <option>--wait</option>.</para>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry>
382 <term><option>--wait</option></term>
383
384 <listitem>
385 <para>Synchronously wait for started units to terminate again.
386 This option may not be combined with <option>--no-block</option>.
387 Note that this will wait forever if any given unit never terminates
388 (by itself or by getting stopped explicitly); particularly services
389 which use <literal>RemainAfterExit=yes</literal>.</para>
390 </listitem>
391 </varlistentry>
392
393 <xi:include href="user-system-options.xml" xpointer="user" />
394 <xi:include href="user-system-options.xml" xpointer="system" />
395
396 <varlistentry>
397 <term><option>--failed</option></term>
398
399 <listitem>
400 <para>List units in failed state. This is equivalent to
401 <option>--state=failed</option>.</para>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry>
406 <term><option>--no-wall</option></term>
407
408 <listitem>
409 <para>Do not send wall message before halt, power-off,
410 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 hangs or 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>,
536 <command>poweroff</command>, <command>reboot</command> or
537 <command>kexec</command>, set a short message explaining the reason
538 for the operation. The message will be logged together with the
539 default shutdown message.</para>
540 </listitem>
541 </varlistentry>
542
543 <varlistentry>
544 <term><option>--now</option></term>
545
546 <listitem>
547 <para>When used with <command>enable</command>, the units
548 will also be started. When used with <command>disable</command> or
549 <command>mask</command>, the units will also be stopped. The start
550 or stop operation is only carried out when the respective enable or
551 disable operation has been successful.</para>
552 </listitem>
553 </varlistentry>
554
555 <varlistentry>
556 <term><option>--root=</option></term>
557
558 <listitem>
559 <para>When used with
560 <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
561 (and related commands), use the specified root path when looking for unit
562 files. If this option is present, <command>systemctl</command> will operate on
563 the file system directly, instead of communicating with the <command>systemd</command>
564 daemon to carry out changes.</para>
565 </listitem>
566
567 </varlistentry>
568
569 <varlistentry>
570 <term><option>--runtime</option></term>
571
572 <listitem>
573 <para>When used with <command>enable</command>,
574 <command>disable</command>, <command>edit</command>,
575 (and related commands), make changes only temporarily, so
576 that they are lost on the next reboot. This will have the
577 effect that changes are not made in subdirectories of
578 <filename>/etc</filename> but in <filename>/run</filename>,
579 with identical immediate effects, however, since the latter
580 is lost on reboot, the changes are lost too.</para>
581
582 <para>Similarly, when used with
583 <command>set-property</command>, make changes only
584 temporarily, so that they are lost on the next
585 reboot.</para>
586 </listitem>
587 </varlistentry>
588
589 <varlistentry>
590 <term><option>--preset-mode=</option></term>
591
592 <listitem>
593 <para>Takes one of <literal>full</literal> (the default),
594 <literal>enable-only</literal>,
595 <literal>disable-only</literal>. When used with the
596 <command>preset</command> or <command>preset-all</command>
597 commands, controls whether units shall be disabled and
598 enabled according to the preset rules, or only enabled, or
599 only disabled.</para>
600 </listitem>
601 </varlistentry>
602
603 <varlistentry>
604 <term><option>-n</option></term>
605 <term><option>--lines=</option></term>
606
607 <listitem>
608 <para>When used with <command>status</command>, controls the
609 number of journal lines to show, counting from the most
610 recent ones. Takes a positive integer argument. Defaults to
611 10.</para>
612 </listitem>
613 </varlistentry>
614
615 <varlistentry>
616 <term><option>-o</option></term>
617 <term><option>--output=</option></term>
618
619 <listitem>
620 <para>When used with <command>status</command>, controls the
621 formatting of the journal entries that are shown. For the
622 available choices, see
623 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
624 Defaults to <literal>short</literal>.</para>
625 </listitem>
626 </varlistentry>
627
628 <varlistentry>
629 <term><option>--firmware-setup</option></term>
630
631 <listitem>
632 <para>When used with the <command>reboot</command> command,
633 indicate to the system's firmware to boot into setup
634 mode. Note that this is currently only supported on some EFI
635 systems and only if the system was booted in EFI
636 mode.</para>
637 </listitem>
638 </varlistentry>
639
640 <varlistentry>
641 <term><option>--plain</option></term>
642
643 <listitem>
644 <para>When used with <command>list-dependencies</command>,
645 <command>list-units</command> or <command>list-machines</command>,
646 the output is printed as a list instead of a tree, and the bullet
647 circles are omitted.</para>
648 </listitem>
649 </varlistentry>
650
651 <xi:include href="user-system-options.xml" xpointer="host" />
652 <xi:include href="user-system-options.xml" xpointer="machine" />
653
654 <xi:include href="standard-options.xml" xpointer="no-pager" />
655 <xi:include href="standard-options.xml" xpointer="no-legend" />
656 <xi:include href="standard-options.xml" xpointer="help" />
657 <xi:include href="standard-options.xml" xpointer="version" />
658 </variablelist>
659 </refsect1>
660
661 <refsect1>
662 <title>Commands</title>
663
664 <para>The following commands are understood:</para>
665
666 <refsect2>
667 <title>Unit Commands</title>
668
669 <variablelist>
670 <varlistentry>
671 <term><command>list-units <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
672
673 <listitem>
674 <para>List units that <command>systemd</command> currently has in memory. This includes units that are
675 either referenced directly or through a dependency, units that are pinned by applications programmatically,
676 or units that were active in the past and have failed. By default only units which are active, have pending
677 jobs, or have failed are shown; this can be changed with option <option>--all</option>. If one or more
678 <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown. The units
679 that are shown are additionally filtered by <option>--type=</option> and <option>--state=</option> if those
680 options are specified.</para>
681
682 <para>This is the default command.</para>
683 </listitem>
684 </varlistentry>
685
686 <varlistentry>
687 <term><command>list-sockets <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
688
689 <listitem>
690 <para>List socket units currently in memory, ordered by listening address. If one or more
691 <replaceable>PATTERN</replaceable>s are specified, only socket units matching one of them are
692 shown. Produces output similar to
693 <programlisting>
694 LISTEN UNIT ACTIVATES
695 /dev/initctl systemd-initctl.socket systemd-initctl.service
696 …
697 [::]:22 sshd.socket sshd.service
698 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
699
700 5 sockets listed.</programlisting>
701 Note: because the addresses might contains spaces, this output
702 is not suitable for programmatic consumption.
703 </para>
704
705 <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
706 </listitem>
707 </varlistentry>
708
709 <varlistentry>
710 <term><command>list-timers <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
711
712 <listitem>
713 <para>List timer units currently in memory, ordered by the time they elapse next. If one or more
714 <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown.
715 </para>
716
717 <para>Also see <option>--all</option> and <option>--state=</option>.</para>
718 </listitem>
719 </varlistentry>
720
721 <varlistentry>
722 <term><command>start <replaceable>PATTERN</replaceable>…</command></term>
723
724 <listitem>
725 <para>Start (activate) one or more units specified on the
726 command line.</para>
727
728 <para>Note that glob patterns operate on the set of primary names of units currently in memory. Units which
729 are not active and are not in a failed state usually are not in memory, and will not be matched by any
730 pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until
731 the instance has been started. Therefore, using glob patterns with <command>start</command> has limited
732 usefulness. Also, secondary alias names of units are not considered.</para>
733 </listitem>
734 </varlistentry>
735 <varlistentry>
736 <term><command>stop <replaceable>PATTERN</replaceable>…</command></term>
737
738 <listitem>
739 <para>Stop (deactivate) one or more units specified on the
740 command line.</para>
741 </listitem>
742 </varlistentry>
743 <varlistentry>
744 <term><command>reload <replaceable>PATTERN</replaceable>…</command></term>
745
746 <listitem>
747 <para>Asks all units listed on the command line to reload
748 their configuration. Note that this will reload the
749 service-specific configuration, not the unit configuration
750 file of systemd. If you want systemd to reload the
751 configuration file of a unit, use the
752 <command>daemon-reload</command> command. In other words:
753 for the example case of Apache, this will reload Apache's
754 <filename>httpd.conf</filename> in the web server, not the
755 <filename>apache.service</filename> systemd unit
756 file.</para>
757
758 <para>This command should not be confused with the
759 <command>daemon-reload</command> command.</para>
760 </listitem>
761
762 </varlistentry>
763 <varlistentry>
764 <term><command>restart <replaceable>PATTERN</replaceable>…</command></term>
765
766 <listitem>
767 <para>Stop and then start one or more units specified on the
768 command line. If the units are not running yet, they will
769 be started.</para>
770 </listitem>
771 </varlistentry>
772 <varlistentry>
773 <term><command>try-restart <replaceable>PATTERN</replaceable>…</command></term>
774
775 <listitem>
776 <para>Stop and then start one or more units specified on the
777 command line if the units are running. This does nothing
778 if units are not running.</para>
779 <!-- Note that we don't document condrestart here, as that is just compatibility support, and we generally
780 don't document that. -->
781 </listitem>
782 </varlistentry>
783 <varlistentry>
784 <term><command>reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
785
786 <listitem>
787 <para>Reload one or more units if they support it. If not,
788 restart them instead. If the units are not running yet, they
789 will be started.</para>
790 </listitem>
791 </varlistentry>
792 <varlistentry>
793 <term><command>try-reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
794
795 <listitem>
796 <para>Reload one or more units if they support it. If not,
797 restart them instead. This does nothing if the units are not
798 running.</para>
799 <!-- Note that we don't document force-reload here, as that is just compatibility support, and we generally
800 don't document that. -->
801 </listitem>
802 </varlistentry>
803 <varlistentry>
804 <term><command>isolate <replaceable>NAME</replaceable></command></term>
805
806 <listitem>
807 <para>Start the unit specified on the command line and its
808 dependencies and stop all others. If a unit name with no
809 extension is given, an extension of
810 <literal>.target</literal> will be assumed.</para>
811
812 <para>This is similar to changing the runlevel in a
813 traditional init system. The <command>isolate</command>
814 command will immediately stop processes that are not enabled
815 in the new unit, possibly including the graphical
816 environment or terminal you are currently using.</para>
817
818 <para>Note that this is allowed only on units where
819 <option>AllowIsolate=</option> is enabled. See
820 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
821 for details.</para>
822 </listitem>
823 </varlistentry>
824 <varlistentry>
825 <term><command>kill <replaceable>PATTERN</replaceable>…</command></term>
826
827 <listitem>
828 <para>Send a signal to one or more processes of the
829 unit. Use <option>--kill-who=</option> to select which
830 process to kill. Use <option>--signal=</option> to select
831 the signal to send.</para>
832 </listitem>
833 </varlistentry>
834 <varlistentry>
835 <term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
836
837 <listitem>
838 <para>Check whether any of the specified units are active
839 (i.e. running). Returns an exit code
840 <constant>0</constant> if at least one is active, or
841 non-zero otherwise. Unless <option>--quiet</option> is
842 specified, this will also print the current unit state to
843 standard output.</para>
844 </listitem>
845 </varlistentry>
846 <varlistentry>
847 <term><command>is-failed <replaceable>PATTERN</replaceable>…</command></term>
848
849 <listitem>
850 <para>Check whether any of the specified units are in a
851 "failed" state. Returns an exit code
852 <constant>0</constant> if at least one has failed,
853 non-zero otherwise. Unless <option>--quiet</option> is
854 specified, this will also print the current unit state to
855 standard output.</para>
856 </listitem>
857 </varlistentry>
858 <varlistentry>
859 <term><command>status</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…]</optional></term>
860
861 <listitem>
862 <para>Show terse runtime status information about one or
863 more units, followed by most recent log data from the
864 journal. If no units are specified, show system status. If
865 combined with <option>--all</option>, also show the status of
866 all units (subject to limitations specified with
867 <option>-t</option>). If a PID is passed, show information
868 about the unit the process belongs to.</para>
869
870 <para>This function is intended to generate human-readable
871 output. If you are looking for computer-parsable output,
872 use <command>show</command> instead. By default, this
873 function only shows 10 lines of output and ellipsizes
874 lines to fit in the terminal window. This can be changed
875 with <option>--lines</option> and <option>--full</option>,
876 see above. In addition, <command>journalctl
877 --unit=<replaceable>NAME</replaceable></command> or
878 <command>journalctl
879 --user-unit=<replaceable>NAME</replaceable></command> use
880 a similar filter for messages and might be more
881 convenient.
882 </para>
883
884 <para>Systemd implicitly loads units as necessary, so just running the <command>status</command> will
885 attempt to load a file. The command is thus not useful for determining if something was already loaded or
886 not. The units may possibly also be quickly unloaded after the operation is completed if there's no reason
887 to keep it in memory thereafter.
888 </para>
889
890 <example>
891 <title>Example output from systemctl status </title>
892
893 <programlisting>$ systemctl status bluetooth
894 â—Ź bluetooth.service - Bluetooth service
895 Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
896 Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
897 Docs: man:bluetoothd(8)
898 Main PID: 930 (bluetoothd)
899 Status: "Running"
900 Tasks: 1
901 Memory: 648.0K
902 CPU: 435ms
903 CGroup: /system.slice/bluetooth.service
904 └─930 /usr/lib/bluetooth/bluetoothd
905
906 Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
907 Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
908 Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
909 </programlisting>
910
911 <para>The dot ("â—Ź") uses color on supported terminals to summarize the unit state at a glance. White
912 indicates an <literal>inactive</literal> or <literal>deactivating</literal> state. Red indicates a
913 <literal>failed</literal> or <literal>error</literal> state and green indicates an
914 <literal>active</literal>, <literal>reloading</literal> or <literal>activating</literal> state.
915 </para>
916
917 <para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been loaded into
918 memory. Other possible values for "Loaded:" include: <literal>error</literal> if there was a problem
919 loading it, <literal>not-found</literal>, and <literal>masked</literal>. Along with showing the path to
920 the unit file, this line will also show the enablement state. Enabled commands start at boot. See the
921 full table of possible enablement states — including the definition of <literal>masked</literal> — in the
922 documentation for the <command>is-enabled</command> command.
923 </para>
924
925 <para>The "Active:" line shows active state. The value is usually <literal>active</literal> or
926 <literal>inactive</literal>. Active could mean started, bound, plugged in, etc depending on the unit type.
927 The unit could also be in process of changing states, reporting a state of <literal>activating</literal> or
928 <literal>deactivating</literal>. A special <literal>failed</literal> state is entered when the service
929 failed in some way, such as a crash, exiting with an error code or timing out. If the failed state is
930 entered the cause will be logged for later reference.</para>
931 </example>
932
933 </listitem>
934 </varlistentry>
935 <varlistentry>
936 <term><command>show</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>JOB</replaceable>…</optional></term>
937
938 <listitem>
939 <para>Show properties of one or more units, jobs, or the manager itself. If no argument is specified,
940 properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and
941 if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use
942 <option>--all</option> to show those too. To select specific properties to show, use
943 <option>--property=</option>. This command is intended to be used whenever computer-parsable output is
944 required. Use <command>status</command> if you are looking for formatted human-readable output.</para>
945
946 <para>Many properties shown by <command>systemctl show</command> map directly to configuration settings of
947 the system and service manager and its unit files. Note that the properties shown by the command are
948 generally more low-level, normalized versions of the original configuration settings and expose runtime
949 state in addition to configuration. For example, properties shown for service units include the service's
950 current main process identifier as <literal>MainPID</literal> (which is runtime state), and time settings
951 are always exposed as properties ending in the <literal>…USec</literal> suffix even if a matching
952 configuration options end in <literal>…Sec</literal>, because microseconds is the normalized time unit used
953 by the system and service manager.</para>
954 </listitem>
955 </varlistentry>
956 <varlistentry>
957 <term><command>cat <replaceable>PATTERN</replaceable>…</command></term>
958
959 <listitem>
960 <para>Show backing files of one or more units. Prints the
961 "fragment" and "drop-ins" (source files) of units. Each
962 file is preceded by a comment which includes the file
963 name. Note that this shows the contents of the backing files
964 on disk, which may not match the system manager's
965 understanding of these units if any unit files were
966 updated on disk and the <command>daemon-reload</command>
967 command wasn't issued since.</para>
968 </listitem>
969 </varlistentry>
970 <varlistentry>
971 <term><command>set-property <replaceable>NAME</replaceable> <replaceable>ASSIGNMENT</replaceable>…</command></term>
972
973 <listitem>
974 <para>Set the specified unit properties at runtime where
975 this is supported. This allows changing configuration
976 parameter properties such as resource control settings at
977 runtime. Not all properties may be changed at runtime, but
978 many resource control settings (primarily those in
979 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
980 may. The changes are applied instantly, and stored on disk
981 for future boots, unless <option>--runtime</option> is
982 passed, in which case the settings only apply until the
983 next reboot. The syntax of the property assignment follows
984 closely the syntax of assignments in unit files.</para>
985
986 <para>Example: <command>systemctl set-property foobar.service CPUShares=777</command></para>
987
988 <para>If the specified unit appears to be inactive, the
989 changes will be only stored on disk as described
990 previously hence they will be effective when the unit will
991 be started.</para>
992
993 <para>Note that this command allows changing multiple
994 properties at the same time, which is preferable over
995 setting them individually. Like unit file configuration
996 settings, assigning the empty list to list parameters will
997 reset the list.</para>
998 </listitem>
999 </varlistentry>
1000
1001 <varlistentry>
1002 <term><command>help <replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…</command></term>
1003
1004 <listitem>
1005 <para>Show manual pages for one or more units, if
1006 available. If a PID is given, the manual pages for the unit
1007 the process belongs to are shown.</para>
1008 </listitem>
1009 </varlistentry>
1010
1011 <varlistentry>
1012 <term><command>reset-failed [<replaceable>PATTERN</replaceable>…]</command></term>
1013
1014 <listitem>
1015 <para>Reset the <literal>failed</literal> state of the
1016 specified units, or if no unit name is passed, reset the state of all
1017 units. When a unit fails in some way (i.e. process exiting
1018 with non-zero error code, terminating abnormally or timing
1019 out), it will automatically enter the
1020 <literal>failed</literal> state and its exit code and status
1021 is recorded for introspection by the administrator until the
1022 service is restarted or reset with this command.</para>
1023 </listitem>
1024 </varlistentry>
1025
1026 <varlistentry>
1027 <term>
1028 <command>list-dependencies</command>
1029 <optional><replaceable>NAME</replaceable></optional>
1030 </term>
1031
1032 <listitem>
1033 <para>Shows units required and wanted by the specified
1034 unit. This recursively lists units following the
1035 <varname>Requires=</varname>,
1036 <varname>Requisite=</varname>,
1037 <varname>ConsistsOf=</varname>,
1038 <varname>Wants=</varname>, <varname>BindsTo=</varname>
1039 dependencies. If no unit is specified,
1040 <filename>default.target</filename> is implied.</para>
1041
1042 <para>By default, only target units are recursively
1043 expanded. When <option>--all</option> is passed, all other
1044 units are recursively expanded as well.</para>
1045
1046 <para>Options <option>--reverse</option>,
1047 <option>--after</option>, <option>--before</option>
1048 may be used to change what types of dependencies
1049 are shown.</para>
1050 </listitem>
1051 </varlistentry>
1052 </variablelist>
1053 </refsect2>
1054
1055 <refsect2>
1056 <title>Unit File Commands</title>
1057
1058 <variablelist>
1059 <varlistentry>
1060 <term><command>list-unit-files <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1061
1062 <listitem>
1063 <para>List unit files installed on the system, in combination with their enablement state (as reported by
1064 <command>is-enabled</command>). If one or more <replaceable>PATTERN</replaceable>s are specified, only unit
1065 files whose name matches one of them are shown (patterns matching unit file system paths are not
1066 supported).</para>
1067 </listitem>
1068 </varlistentry>
1069
1070 <varlistentry>
1071 <term><command>enable <replaceable>NAME</replaceable>…</command></term>
1072 <term><command>enable <replaceable>PATH</replaceable>…</command></term>
1073
1074 <listitem>
1075 <para>Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the
1076 <literal>[Install]</literal> sections of the indicated unit files. After the symlinks have been created,
1077 the system manager configuration is reloaded (in a way equivalent to <command>daemon-reload</command>), in
1078 order to ensure the changes are taken into account immediately. Note that this does
1079 <emphasis>not</emphasis> have the effect of also starting any of the units being enabled. If this is
1080 desired, combine this command with the <option>--now</option> switch, or invoke <command>start</command>
1081 with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of
1082 the form <filename>foo@bar.service</filename>), symlinks named the same as instances are created in the
1083 unit configuration directory, however they point to the single template unit file they are instantiated
1084 from.</para>
1085
1086 <para>This command expects either valid unit names (in which case various unit file directories are
1087 automatically searched for unit files with appropriate names), or absolute paths to unit files (in which
1088 case these files are read directly). If a specified unit file is located outside of the usual unit file
1089 directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring
1090 it is found when requested by commands such as <command>start</command>.</para>
1091
1092 <para>This command will print the file system operations executed. This output may be suppressed by passing
1093 <option>--quiet</option>.
1094 </para>
1095
1096 <para>Note that this operation creates only the symlinks suggested in the <literal>[Install]</literal>
1097 section of the unit files. While this command is the recommended way to manipulate the unit configuration
1098 directory, the administrator is free to make additional changes manually by placing or removing symlinks
1099 below this directory. This is particularly useful to create configurations that deviate from the suggested
1100 default installation. In this case, the administrator must make sure to invoke
1101 <command>daemon-reload</command> manually as necessary, in order to ensure the changes are taken into
1102 account.
1103 </para>
1104
1105 <para>Enabling units should not be confused with starting (activating) units, as done by the
1106 <command>start</command> command. Enabling and starting units is orthogonal: units may be enabled without
1107 being started and started without being enabled. Enabling simply hooks the unit into various suggested
1108 places (for example, so that the unit is automatically started on boot or when a particular kind of
1109 hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds
1110 the socket (in case of socket units), and so on.</para>
1111
1112 <para>Depending on whether <option>--system</option>, <option>--user</option>, <option>--runtime</option>,
1113 or <option>--global</option> is specified, this enables the unit for the system, for the calling user only,
1114 for only this boot of the system, or for all future logins of all users, or only this boot. Note that in
1115 the last case, no systemd daemon configuration is reloaded.</para>
1116
1117 <para>Using <command>enable</command> on masked units is not supported and results in an error.</para>
1118 </listitem>
1119 </varlistentry>
1120
1121 <varlistentry>
1122 <term><command>disable <replaceable>NAME</replaceable>…</command></term>
1123
1124 <listitem>
1125 <para>Disables one or more units. This removes all symlinks to the unit files backing the specified units
1126 from the unit configuration directory, and hence undoes any changes made by <command>enable</command> or
1127 <command>link</command>. Note that this removes <emphasis>all</emphasis> symlinks to matching unit files,
1128 including manually created symlinks, and not just those actually created by <command>enable</command> or
1129 <command>link</command>. Note that while <command>disable</command> undoes the effect of
1130 <command>enable</command>, the two commands are otherwise not symmetric, as <command>disable</command> may
1131 remove more symlinks than a prior <command>enable</command> invocation of the same unit created.</para>
1132
1133 <para>This command expects valid unit names only, it does not accept paths to unit files.</para>
1134
1135 <para>In addition to the units specified as arguments, all units are disabled that are listed in the
1136 <varname>Also=</varname> setting contained in the <literal>[Install]</literal> section of any of the unit
1137 files being operated on.</para>
1138
1139 <para>This command implicitly reloads the system manager configuration after completing the operation. Note
1140 that this command does not implicitly stop the units that are being disabled. If this is desired, either
1141 combine this command with the <option>--now</option> switch, or invoke the <command>stop</command> command
1142 with appropriate arguments later.</para>
1143
1144 <para>This command will print information about the file system operations (symlink removals)
1145 executed. This output may be suppressed by passing <option>--quiet</option>.
1146 </para>
1147
1148 <para>This command honors <option>--system</option>, <option>--user</option>, <option>--runtime</option>
1149 and <option>--global</option> in a similar way as <command>enable</command>.</para>
1150 </listitem>
1151 </varlistentry>
1152
1153 <varlistentry>
1154 <term><command>reenable <replaceable>NAME</replaceable>…</command></term>
1155
1156 <listitem>
1157 <para>Reenable one or more units, as specified on the command line. This is a combination of
1158 <command>disable</command> and <command>enable</command> and is useful to reset the symlinks a unit file is
1159 enabled with to the defaults configured in its <literal>[Install]</literal> section. This command expects
1160 a unit name only, it does not accept paths to unit files.</para>
1161 </listitem>
1162 </varlistentry>
1163
1164 <varlistentry>
1165 <term><command>preset <replaceable>NAME</replaceable>…</command></term>
1166
1167 <listitem>
1168 <para>Reset the enable/disable status one or more unit files, as specified on
1169 the command line, to the defaults configured in the preset policy files. This
1170 has the same effect as <command>disable</command> or
1171 <command>enable</command>, depending how the unit is listed in the preset
1172 files.</para>
1173
1174 <para>Use <option>--preset-mode=</option> to control whether units shall be
1175 enabled and disabled, or only enabled, or only disabled.</para>
1176
1177 <para>If the unit carries no install information, it will be silently ignored
1178 by this command. <replaceable>NAME</replaceable> must be the real unit name,
1179 any alias names are ignored silently.</para>
1180
1181 <para>For more information on the preset policy format, see
1182 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1183 For more information on the concept of presets, please consult the
1184 <ulink url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
1185 document.</para>
1186 </listitem>
1187 </varlistentry>
1188
1189 <varlistentry>
1190 <term><command>preset-all</command></term>
1191
1192 <listitem>
1193 <para>Resets all installed unit files to the defaults
1194 configured in the preset policy file (see above).</para>
1195
1196 <para>Use <option>--preset-mode=</option> to control
1197 whether units shall be enabled and disabled, or only
1198 enabled, or only disabled.</para>
1199 </listitem>
1200 </varlistentry>
1201
1202 <varlistentry>
1203 <term><command>is-enabled <replaceable>NAME</replaceable>…</command></term>
1204
1205 <listitem>
1206 <para>Checks whether any of the specified unit files are
1207 enabled (as with <command>enable</command>). Returns an
1208 exit code of 0 if at least one is enabled, non-zero
1209 otherwise. Prints the current enable status (see table).
1210 To suppress this output, use <option>--quiet</option>.
1211 To show installation targets, use <option>--full</option>.
1212 </para>
1213
1214 <table>
1215 <title>
1216 <command>is-enabled</command> output
1217 </title>
1218
1219 <tgroup cols='3'>
1220 <thead>
1221 <row>
1222 <entry>Name</entry>
1223 <entry>Description</entry>
1224 <entry>Exit Code</entry>
1225 </row>
1226 </thead>
1227 <tbody>
1228 <row>
1229 <entry><literal>enabled</literal></entry>
1230 <entry morerows='1'>Enabled via <filename>.wants/</filename>, <filename>.requires/</filename> or alias symlinks (permanently in <filename>/etc/systemd/system/</filename>, or transiently in <filename>/run/systemd/system/</filename>).</entry>
1231 <entry morerows='1'>0</entry>
1232 </row>
1233 <row>
1234 <entry><literal>enabled-runtime</literal></entry>
1235 </row>
1236 <row>
1237 <entry><literal>linked</literal></entry>
1238 <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>
1239 <entry morerows='1'>&gt; 0</entry>
1240 </row>
1241 <row>
1242 <entry><literal>linked-runtime</literal></entry>
1243 </row>
1244 <row>
1245 <entry><literal>masked</literal></entry>
1246 <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>
1247 <entry morerows='1'>&gt; 0</entry>
1248 </row>
1249 <row>
1250 <entry><literal>masked-runtime</literal></entry>
1251 </row>
1252 <row>
1253 <entry><literal>static</literal></entry>
1254 <entry>The unit file is not enabled, and has no provisions for enabling in the <literal>[Install]</literal> unit file section.</entry>
1255 <entry>0</entry>
1256 </row>
1257 <row>
1258 <entry><literal>indirect</literal></entry>
1259 <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.</entry>
1260 <entry>0</entry>
1261 </row>
1262 <row>
1263 <entry><literal>disabled</literal></entry>
1264 <entry>The unit file is not enabled, but contains an <literal>[Install]</literal> section with installation instructions.</entry>
1265 <entry>&gt; 0</entry>
1266 </row>
1267 <row>
1268 <entry><literal>generated</literal></entry>
1269 <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>
1270 <entry>0</entry>
1271 </row>
1272 <row>
1273 <entry><literal>transient</literal></entry>
1274 <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.</entry>
1275 <entry>0</entry>
1276 </row>
1277 <row>
1278 <entry><literal>bad</literal></entry>
1279 <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>
1280 <entry>&gt; 0</entry>
1281 </row>
1282 </tbody>
1283 </tgroup>
1284 </table>
1285
1286 </listitem>
1287 </varlistentry>
1288
1289 <varlistentry>
1290 <term><command>mask <replaceable>NAME</replaceable>…</command></term>
1291
1292 <listitem>
1293 <para>Mask one or more units, as specified on the command line. This will link these unit files to
1294 <filename>/dev/null</filename>, making it impossible to start them. This is a stronger version of
1295 <command>disable</command>, since it prohibits all kinds of activation of the unit, including enablement
1296 and manual activation. Use this option with care. This honors the <option>--runtime</option> option to only
1297 mask temporarily until the next reboot of the system. The <option>--now</option> option may be used to
1298 ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit
1299 file paths.</para>
1300 </listitem>
1301 </varlistentry>
1302
1303 <varlistentry>
1304 <term><command>unmask <replaceable>NAME</replaceable>…</command></term>
1305
1306 <listitem>
1307 <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
1308 <command>mask</command>. This command expects valid unit names only, it does not accept unit file
1309 paths.</para>
1310 </listitem>
1311 </varlistentry>
1312
1313 <varlistentry>
1314 <term><command>link <replaceable>PATH</replaceable>…</command></term>
1315
1316 <listitem>
1317 <para>Link a unit file that is not in the unit file search paths into the unit file search path. This
1318 command expects an absolute path to a unit file. The effect of this may be undone with
1319 <command>disable</command>. The effect of this command is that a unit file is made available for commands
1320 such as <command>start</command>, even though it is not installed directly in the unit search path.</para>
1321 </listitem>
1322 </varlistentry>
1323
1324 <varlistentry>
1325 <term><command>revert <replaceable>NAME</replaceable>…</command></term>
1326
1327 <listitem>
1328 <para>Revert one or more unit files to their vendor versions. This command removes drop-in configuration
1329 files that modify the specified units, as well as any user-configured unit file that overrides a matching
1330 vendor supplied unit file. Specifically, for a unit <literal>foo.service</literal> the matching directories
1331 <literal>foo.service.d/</literal> with all their contained files are removed, both below the persistent and
1332 runtime configuration directories (i.e. below <filename>/etc/systemd/system</filename> and
1333 <filename>/run/systemd/system</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
1334 located below <filename>/usr</filename>) any matching persistent or runtime unit file that overrides it is
1335 removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below
1336 <filename>/etc/systemd/system</filename> or <filename>/run/systemd/system</filename>, but not in a unit
1337 file stored below <filename>/usr</filename>), then it is not removed. Also, if a unit is masked, it is
1338 unmasked.</para>
1339
1340 <para>Effectively, this command may be used to undo all changes made with <command>systemctl
1341 edit</command>, <command>systemctl set-property</command> and <command>systemctl mask</command> and puts
1342 the original unit file with its settings back in effect.</para>
1343 </listitem>
1344 </varlistentry>
1345
1346 <varlistentry>
1347 <term><command>add-wants <replaceable>TARGET</replaceable>
1348 <replaceable>NAME</replaceable>…</command></term>
1349 <term><command>add-requires <replaceable>TARGET</replaceable>
1350 <replaceable>NAME</replaceable>…</command></term>
1351
1352 <listitem>
1353 <para>Adds <literal>Wants=</literal> or <literal>Requires=</literal>
1354 dependencies, respectively, to the specified
1355 <replaceable>TARGET</replaceable> for one or more units. </para>
1356
1357 <para>This command honors <option>--system</option>,
1358 <option>--user</option>, <option>--runtime</option> and
1359 <option>--global</option> in a way similar to
1360 <command>enable</command>.</para>
1361
1362 </listitem>
1363 </varlistentry>
1364
1365 <varlistentry>
1366 <term><command>edit <replaceable>NAME</replaceable>…</command></term>
1367
1368 <listitem>
1369 <para>Edit a drop-in snippet or a whole replacement file if
1370 <option>--full</option> is specified, to extend or override the
1371 specified unit.</para>
1372
1373 <para>Depending on whether <option>--system</option> (the default),
1374 <option>--user</option>, or <option>--global</option> is specified,
1375 this command creates a drop-in file for each unit either for the system,
1376 for the calling user, or for all futures logins of all users. Then,
1377 the editor (see the "Environment" section below) is invoked on
1378 temporary files which will be written to the real location if the
1379 editor exits successfully.</para>
1380
1381 <para>If <option>--full</option> is specified, this will copy the
1382 original units instead of creating drop-in files.</para>
1383
1384 <para>If <option>--force</option> is specified and any units do
1385 not already exist, new unit files will be opened for editing.</para>
1386
1387 <para>If <option>--runtime</option> is specified, the changes will
1388 be made temporarily in <filename>/run</filename> and they will be
1389 lost on the next reboot.</para>
1390
1391 <para>If the temporary file is empty upon exit, the modification of
1392 the related unit is canceled.</para>
1393
1394 <para>After the units have been edited, systemd configuration is
1395 reloaded (in a way that is equivalent to <command>daemon-reload</command>).
1396 </para>
1397
1398 <para>Note that this command cannot be used to remotely edit units
1399 and that you cannot temporarily edit units which are in
1400 <filename>/etc</filename>, since they take precedence over
1401 <filename>/run</filename>.</para>
1402 </listitem>
1403 </varlistentry>
1404
1405 <varlistentry>
1406 <term><command>get-default</command></term>
1407
1408 <listitem>
1409 <para>Return the default target to boot into. This returns
1410 the target unit name <filename>default.target</filename>
1411 is aliased (symlinked) to.</para>
1412 </listitem>
1413 </varlistentry>
1414
1415 <varlistentry>
1416 <term><command>set-default <replaceable>NAME</replaceable></command></term>
1417
1418 <listitem>
1419 <para>Set the default target to boot into. This sets
1420 (symlinks) the <filename>default.target</filename> alias
1421 to the given target unit.</para>
1422 </listitem>
1423 </varlistentry>
1424
1425 </variablelist>
1426 </refsect2>
1427
1428 <refsect2>
1429 <title>Machine Commands</title>
1430
1431 <variablelist>
1432 <varlistentry>
1433 <term><command>list-machines <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
1434
1435 <listitem>
1436 <para>List the host and all running local containers with
1437 their state. If one or more
1438 <replaceable>PATTERN</replaceable>s are specified, only
1439 containers matching one of them are shown.
1440 </para>
1441 </listitem>
1442 </varlistentry>
1443 </variablelist>
1444 </refsect2>
1445
1446 <refsect2>
1447 <title>Job Commands</title>
1448
1449 <variablelist>
1450 <varlistentry>
1451 <term><command>list-jobs <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1452
1453 <listitem>
1454 <para>List jobs that are in progress. If one or more
1455 <replaceable>PATTERN</replaceable>s are specified, only
1456 jobs for units matching one of them are shown.</para>
1457
1458 <para>When combined with <option>--after</option> or <option>--before</option> the list is augmented with
1459 information on which other job each job is waiting for, and which other jobs are waiting for it, see
1460 above.</para>
1461 </listitem>
1462 </varlistentry>
1463 <varlistentry>
1464 <term><command>cancel <replaceable>JOB</replaceable>…</command></term>
1465
1466 <listitem>
1467 <para>Cancel one or more jobs specified on the command line
1468 by their numeric job IDs. If no job ID is specified, cancel
1469 all pending jobs.</para>
1470 </listitem>
1471 </varlistentry>
1472 </variablelist>
1473 </refsect2>
1474
1475 <refsect2>
1476 <title>Environment Commands</title>
1477
1478 <variablelist>
1479 <varlistentry>
1480 <term><command>show-environment</command></term>
1481
1482 <listitem>
1483 <para>Dump the systemd manager environment block. The
1484 environment block will be dumped in straight-forward form
1485 suitable for sourcing into a shell script. This environment
1486 block will be passed to all processes the manager
1487 spawns.</para>
1488 </listitem>
1489 </varlistentry>
1490 <varlistentry>
1491 <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
1492
1493 <listitem>
1494 <para>Set one or more systemd manager environment variables,
1495 as specified on the command line.</para>
1496 </listitem>
1497 </varlistentry>
1498 <varlistentry>
1499 <term><command>unset-environment <replaceable>VARIABLE</replaceable>…</command></term>
1500
1501 <listitem>
1502 <para>Unset one or more systemd manager environment
1503 variables. If only a variable name is specified, it will be
1504 removed regardless of its value. If a variable and a value
1505 are specified, the variable is only removed if it has the
1506 specified value.</para>
1507 </listitem>
1508 </varlistentry>
1509 <varlistentry>
1510 <term>
1511 <command>import-environment</command>
1512 <optional><replaceable>VARIABLE…</replaceable></optional>
1513 </term>
1514
1515 <listitem>
1516 <para>Import all, one or more environment variables set on
1517 the client into the systemd manager environment block. If
1518 no arguments are passed, the entire environment block is
1519 imported. Otherwise, a list of one or more environment
1520 variable names should be passed, whose client-side values
1521 are then imported into the manager's environment
1522 block.</para>
1523 </listitem>
1524 </varlistentry>
1525 </variablelist>
1526 </refsect2>
1527
1528 <refsect2>
1529 <title>Manager Lifecycle Commands</title>
1530
1531 <variablelist>
1532 <varlistentry>
1533 <term><command>daemon-reload</command></term>
1534
1535 <listitem>
1536 <para>Reload the systemd manager configuration. This will
1537 rerun all generators (see
1538 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1539 reload all unit files, and recreate the entire dependency
1540 tree. While the daemon is being reloaded, all sockets
1541 systemd listens on behalf of user configuration will stay
1542 accessible.</para>
1543
1544 <para>This command should not be confused with the
1545 <command>reload</command> command.</para>
1546 </listitem>
1547 </varlistentry>
1548 <varlistentry>
1549 <term><command>daemon-reexec</command></term>
1550
1551 <listitem>
1552 <para>Reexecute the systemd manager. This will serialize the
1553 manager state, reexecute the process and deserialize the
1554 state again. This command is of little use except for
1555 debugging and package upgrades. Sometimes, it might be
1556 helpful as a heavy-weight <command>daemon-reload</command>.
1557 While the daemon is being reexecuted, all sockets systemd listening
1558 on behalf of user configuration will stay accessible.
1559 </para>
1560 </listitem>
1561 </varlistentry>
1562 </variablelist>
1563 </refsect2>
1564
1565 <refsect2>
1566 <title>System Commands</title>
1567
1568 <variablelist>
1569 <varlistentry>
1570 <term><command>is-system-running</command></term>
1571
1572 <listitem>
1573 <para>Checks whether the system is operational. This
1574 returns success (exit code 0) when the system is fully up
1575 and running, specifically not in startup, shutdown or
1576 maintenance mode, and with no failed services. Failure is
1577 returned otherwise (exit code non-zero). In addition, the
1578 current state is printed in a short string to standard
1579 output, see the table below. Use <option>--quiet</option> to
1580 suppress this output.</para>
1581
1582 <table>
1583 <title><command>is-system-running</command> output</title>
1584 <tgroup cols='3'>
1585 <colspec colname='name'/>
1586 <colspec colname='description'/>
1587 <colspec colname='exit-code'/>
1588 <thead>
1589 <row>
1590 <entry>Name</entry>
1591 <entry>Description</entry>
1592 <entry>Exit Code</entry>
1593 </row>
1594 </thead>
1595 <tbody>
1596 <row>
1597 <entry><varname>initializing</varname></entry>
1598 <entry><para>Early bootup, before
1599 <filename>basic.target</filename> is reached
1600 or the <varname>maintenance</varname> state entered.
1601 </para></entry>
1602 <entry>&gt; 0</entry>
1603 </row>
1604 <row>
1605 <entry><varname>starting</varname></entry>
1606 <entry><para>Late bootup, before the job queue
1607 becomes idle for the first time, or one of the
1608 rescue targets are reached.</para></entry>
1609 <entry>&gt; 0</entry>
1610 </row>
1611 <row>
1612 <entry><varname>running</varname></entry>
1613 <entry><para>The system is fully
1614 operational.</para></entry>
1615 <entry>0</entry>
1616 </row>
1617 <row>
1618 <entry><varname>degraded</varname></entry>
1619 <entry><para>The system is operational but one or more
1620 units failed.</para></entry>
1621 <entry>&gt; 0</entry>
1622 </row>
1623 <row>
1624 <entry><varname>maintenance</varname></entry>
1625 <entry><para>The rescue or emergency target is
1626 active.</para></entry>
1627 <entry>&gt; 0</entry>
1628 </row>
1629 <row>
1630 <entry><varname>stopping</varname></entry>
1631 <entry><para>The manager is shutting
1632 down.</para></entry>
1633 <entry>&gt; 0</entry>
1634 </row>
1635 <row>
1636 <entry><varname>offline</varname></entry>
1637 <entry><para>The manager is not
1638 running. Specifically, this is the operational
1639 state if an incompatible program is running as
1640 system manager (PID 1).</para></entry>
1641 <entry>&gt; 0</entry>
1642 </row>
1643 <row>
1644 <entry><varname>unknown</varname></entry>
1645 <entry><para>The operational state could not be
1646 determined, due to lack of resources or another
1647 error cause.</para></entry>
1648 <entry>&gt; 0</entry>
1649 </row>
1650 </tbody>
1651 </tgroup>
1652 </table>
1653 </listitem>
1654 </varlistentry>
1655
1656 <varlistentry>
1657 <term><command>default</command></term>
1658
1659 <listitem>
1660 <para>Enter default mode. This is mostly equivalent to
1661 <command>isolate default.target</command>.</para>
1662 </listitem>
1663 </varlistentry>
1664
1665 <varlistentry>
1666 <term><command>rescue</command></term>
1667
1668 <listitem>
1669 <para>Enter rescue mode. This is mostly equivalent to
1670 <command>isolate rescue.target</command>, but also prints a
1671 wall message to all users.</para>
1672 </listitem>
1673 </varlistentry>
1674 <varlistentry>
1675 <term><command>emergency</command></term>
1676
1677 <listitem>
1678 <para>Enter emergency mode. This is mostly equivalent to
1679 <command>isolate emergency.target</command>, but also prints
1680 a wall message to all users.</para>
1681 </listitem>
1682 </varlistentry>
1683 <varlistentry>
1684 <term><command>halt</command></term>
1685
1686 <listitem>
1687 <para>Shut down and halt the system. This is mostly equivalent to <command>start halt.target
1688 --job-mode=replace-irreversibly</command>, but also prints a wall message to all users. If combined with
1689 <option>--force</option>, shutdown of all running services is skipped, however all processes are killed and
1690 all file systems are unmounted or mounted read-only, immediately followed by the system halt. If
1691 <option>--force</option> is specified twice, the operation is immediately executed without terminating any
1692 processes or unmounting any file systems. This may result in data loss. Note that when
1693 <option>--force</option> is specified twice the halt operation is executed by
1694 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1695 succeed even when the system manager hangs or crashed.</para>
1696 </listitem>
1697 </varlistentry>
1698 <varlistentry>
1699 <term><command>poweroff</command></term>
1700
1701 <listitem>
1702 <para>Shut down and power-off the system. This is mostly equivalent to <command>start poweroff.target
1703 --job-mode=replace-irreversibly</command>, but also prints a wall message to all users. If combined with
1704 <option>--force</option>, shutdown of all running services is skipped, however all processes are killed and
1705 all file systems are unmounted or mounted read-only, immediately followed by the powering off. If
1706 <option>--force</option> is specified twice, the operation is immediately executed without terminating any
1707 processes or unmounting any file systems. This may result in data loss. Note that when
1708 <option>--force</option> is specified twice the power-off operation is executed by
1709 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1710 succeed even when the system manager hangs or crashed.</para>
1711 </listitem>
1712 </varlistentry>
1713 <varlistentry>
1714 <term><command>reboot <optional><replaceable>arg</replaceable></optional></command></term>
1715
1716 <listitem>
1717 <para>Shut down and reboot the system. This is mostly equivalent to <command>start reboot.target
1718 --job-mode=replace-irreversibly</command>, but also prints a wall message to all users. If combined with
1719 <option>--force</option>, shutdown of all running services is skipped, however all processes are killed and
1720 all file systems are unmounted or mounted read-only, immediately followed by the reboot. If
1721 <option>--force</option> is specified twice, the operation is immediately executed without terminating any
1722 processes or unmounting any file systems. This may result in data loss. Note that when
1723 <option>--force</option> is specified twice the reboot operation is executed by
1724 <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1725 succeed even when the system manager hangs or crashed.</para>
1726
1727 <para>If the optional argument
1728 <replaceable>arg</replaceable> is given, it will be passed
1729 as the optional argument to the
1730 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1731 system call. The value is architecture and firmware
1732 specific. As an example, <literal>recovery</literal> might
1733 be used to trigger system recovery, and
1734 <literal>fota</literal> might be used to trigger a
1735 <quote>firmware over the air</quote> update.</para>
1736 </listitem>
1737 </varlistentry>
1738
1739 <varlistentry>
1740 <term><command>kexec</command></term>
1741
1742 <listitem>
1743 <para>Shut down and reboot the system via kexec. This is
1744 mostly equivalent to <command>start kexec.target --job-mode=replace-irreversibly</command>,
1745 but also prints a wall message to all users. If combined
1746 with <option>--force</option>, shutdown of all running
1747 services is skipped, however all processes are killed and
1748 all file systems are unmounted or mounted read-only,
1749 immediately followed by the reboot.</para>
1750 </listitem>
1751 </varlistentry>
1752
1753 <varlistentry>
1754 <term><command>exit <optional><replaceable>EXIT_CODE</replaceable></optional></command></term>
1755
1756 <listitem>
1757 <para>Ask the systemd manager to quit. This is only
1758 supported for user service managers (i.e. in conjunction
1759 with the <option>--user</option> option) or in containers
1760 and is equivalent to <command>poweroff</command> otherwise.</para>
1761
1762 <para>The systemd manager can exit with a non-zero exit
1763 code if the optional argument
1764 <replaceable>EXIT_CODE</replaceable> is given.</para>
1765 </listitem>
1766 </varlistentry>
1767
1768 <varlistentry>
1769 <term><command>switch-root <replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></command></term>
1770
1771 <listitem>
1772 <para>Switches to a different root directory and executes a new system manager process below it. This is
1773 intended for usage in initial RAM disks ("initrd"), and will transition from the initrd's system manager
1774 process (a.k.a. "init" process) to the main system manager process which is loaded from the actual host
1775 volume. This call takes two arguments: the directory that is to become the new root directory, and the path
1776 to the new system manager binary below it to execute as PID 1. If the latter is omitted or the empty
1777 string, a systemd binary will automatically be searched for and used as init. If the system manager path is
1778 omitted, equal to the empty string or identical to the path to the systemd binary, the state of the
1779 initrd's system manager process is passed to the main system manager, which allows later introspection of
1780 the state of the services involved in the initrd boot phase.</para>
1781 </listitem>
1782 </varlistentry>
1783
1784 <varlistentry>
1785 <term><command>suspend</command></term>
1786
1787 <listitem>
1788 <para>Suspend the system. This will trigger activation of
1789 the special <filename>suspend.target</filename> target.
1790 </para>
1791 </listitem>
1792 </varlistentry>
1793
1794 <varlistentry>
1795 <term><command>hibernate</command></term>
1796
1797 <listitem>
1798 <para>Hibernate the system. This will trigger activation of
1799 the special <filename>hibernate.target</filename> target.
1800 </para>
1801 </listitem>
1802 </varlistentry>
1803
1804 <varlistentry>
1805 <term><command>hybrid-sleep</command></term>
1806
1807 <listitem>
1808 <para>Hibernate and suspend the system. This will trigger
1809 activation of the special
1810 <filename>hybrid-sleep.target</filename> target.</para>
1811 </listitem>
1812 </varlistentry>
1813 </variablelist>
1814 </refsect2>
1815
1816 <refsect2>
1817 <title>Parameter Syntax</title>
1818
1819 <para>Unit commands listed above take either a single unit name (designated as <replaceable>NAME</replaceable>),
1820 or multiple unit specifications (designated as <replaceable>PATTERN</replaceable>…). In the first case, the
1821 unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"),
1822 systemctl will append a suitable suffix, <literal>.service</literal> by default, and a type-specific suffix in
1823 case of commands which operate only on specific unit types. For example,
1824 <programlisting># systemctl start sshd</programlisting> and
1825 <programlisting># systemctl start sshd.service</programlisting>
1826 are equivalent, as are
1827 <programlisting># systemctl isolate default</programlisting>
1828 and
1829 <programlisting># systemctl isolate default.target</programlisting>
1830 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1831 paths to mount unit names.
1832 <programlisting># systemctl status /dev/sda
1833 # systemctl status /home</programlisting>
1834 are equivalent to:
1835 <programlisting># systemctl status dev-sda.device
1836 # systemctl status home.mount</programlisting>
1837 In the second case, shell-style globs will be matched against the primary names of all units currently in memory;
1838 literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1839 names always refer to exactly one unit, but globs may match zero units and this is not considered an
1840 error.</para>
1841
1842 <para>Glob patterns use
1843 <citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1844 so normal shell-style globbing rules are used, and
1845 <literal>*</literal>, <literal>?</literal>,
1846 <literal>[]</literal> may be used. See
1847 <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1848 for more details. The patterns are matched against the primary names of
1849 units currently in memory, and patterns which do not match anything
1850 are silently skipped. For example:
1851 <programlisting># systemctl stop sshd@*.service</programlisting>
1852 will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that aren't
1853 in memory are not considered for glob expansion.
1854 </para>
1855
1856 <para>For unit file commands, the specified <replaceable>NAME</replaceable> should be the name of the unit file
1857 (possibly abbreviated, see above), or the absolute path to the unit file:
1858 <programlisting># systemctl enable foo.service</programlisting>
1859 or
1860 <programlisting># systemctl link /path/to/foo.service</programlisting>
1861 </para>
1862 </refsect2>
1863
1864 </refsect1>
1865
1866 <refsect1>
1867 <title>Exit status</title>
1868
1869 <para>On success, 0 is returned, a non-zero failure
1870 code otherwise.</para>
1871 </refsect1>
1872
1873 <refsect1>
1874 <title>Environment</title>
1875
1876 <variablelist class='environment-variables'>
1877 <varlistentry>
1878 <term><varname>$SYSTEMD_EDITOR</varname></term>
1879
1880 <listitem><para>Editor to use when editing units; overrides
1881 <varname>$EDITOR</varname> and <varname>$VISUAL</varname>. If neither
1882 <varname>$SYSTEMD_EDITOR</varname> nor <varname>$EDITOR</varname> nor
1883 <varname>$VISUAL</varname> are present or if it is set to an empty
1884 string or if their execution failed, systemctl will try to execute well
1885 known editors in this order:
1886 <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1887 <citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1888 <citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1889 <citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1890 </para></listitem>
1891 </varlistentry>
1892 </variablelist>
1893 <xi:include href="less-variables.xml" xpointer="pager"/>
1894 <xi:include href="less-variables.xml" xpointer="less"/>
1895 <xi:include href="less-variables.xml" xpointer="lesscharset"/>
1896 </refsect1>
1897
1898 <refsect1>
1899 <title>See Also</title>
1900 <para>
1901 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1902 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1903 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1904 <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1905 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1906 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1907 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1908 <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1909 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1910 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1911 <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1912 </para>
1913 </refsect1>
1914
1915 </refentry>