]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemctl.xml
man: Make options consistent
[thirdparty/systemd.git] / man / systemctl.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemctl">
25
26 <refentryinfo>
27 <title>systemctl</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemctl</refentrytitle>
42 <manvolnum>1</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemctl</refname>
47 <refpurpose>Control the systemd system and service manager</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <cmdsynopsis>
52 <command>systemctl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg> <arg choice="opt" rep="repeat">NAME</arg></command>
53 </cmdsynopsis>
54 </refsynopsisdiv>
55
56 <refsect1>
57 <title>Description</title>
58
59 <para><command>systemctl</command> may be used to
60 introspect and control the state of the
61 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
62 system and service manager.</para>
63 </refsect1>
64
65 <refsect1>
66 <title>Options</title>
67
68 <para>The following options are understood:</para>
69
70 <variablelist>
71 <varlistentry>
72 <term><option>-h</option></term>
73 <term><option>--help</option></term>
74
75 <listitem><para>Prints a short help
76 text and exits.</para></listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><option>--version</option></term>
81
82 <listitem><para>Prints a short version
83 string and exits.</para></listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term><option>-t</option></term>
88 <term><option>--type=</option></term>
89
90 <listitem><para>The argument should
91 be a unit type name such as
92 <option>service</option> and
93 <option>socket</option>,
94 or a unit load state such as
95 <option>loaded</option> and
96 <option>masked</option>.
97 </para>
98
99 <para>If the argument is a unit type,
100 when listing units, limit display to
101 certain unit types. If not specified
102 units of all types will be shown.</para>
103
104 <para>If the argument is a unit load state,
105 when listing units, limit display to
106 certain unit types. If not specified
107 units of in all load states will be
108 shown.</para>
109
110 <para>As a special case, if the argument
111 is <option>help</option>, a list of
112 allowed values will be printed and the
113 program will exit.</para>
114 </listitem>
115 </varlistentry>
116
117 <varlistentry>
118 <term><option>-p</option></term>
119 <term><option>--property=</option></term>
120
121 <listitem><para>When showing
122 unit/job/manager properties, limit
123 display to certain properties as
124 specified as argument. If not
125 specified all set properties are
126 shown. The argument should be a
127 property name, such as
128 <literal>MainPID</literal>. If
129 specified more than once all
130 properties with the specified names
131 are shown.</para></listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term><option>-a</option></term>
136 <term><option>--all</option></term>
137
138 <listitem><para>When listing units,
139 show all units, regardless of their
140 state, including inactive units. When
141 showing unit/job/manager properties,
142 show all properties regardless whether
143 they are set or not.</para></listitem>
144 </varlistentry>
145
146 <varlistentry>
147 <term><option>--failed</option></term>
148
149 <listitem><para>When listing units,
150 show only failed units. Do not confuse
151 with
152 <option>--fail</option>.</para></listitem>
153 </varlistentry>
154
155 <varlistentry>
156 <term><option>--full</option></term>
157
158 <listitem><para>Do not ellipsize unit
159 names, cgroup members, and truncate unit descriptions
160 in the output of
161 <command>list-units</command> and
162 <command>list-jobs</command>.</para></listitem>
163 </varlistentry>
164
165 <varlistentry>
166 <term><option>--fail</option></term>
167
168 <listitem><para>If the requested
169 operation conflicts with a pending
170 unfinished job, fail the command. If
171 this is not specified the requested
172 operation will replace the pending job,
173 if necessary. Do not confuse
174 with
175 <option>--failed</option>.</para></listitem>
176 </varlistentry>
177
178 <varlistentry>
179 <term><option>--ignore-dependencies</option></term>
180
181 <listitem><para>When enqueuing a new
182 job ignore all its dependencies and
183 execute it immediately. If passed no
184 required units of the unit passed will
185 be pulled in, and no ordering
186 dependencies will be honored. This is
187 mostly a debugging and rescue tool for
188 the administrator and should not be
189 used by
190 applications.</para></listitem>
191 </varlistentry>
192
193 <varlistentry>
194 <term><option>-i</option></term>
195 <term><option>--ignore-inhibitors</option></term>
196
197 <listitem><para>When system shutdown
198 or a sleep state is requested, ignore
199 inhibitor locks. Applications can
200 establish inhibitor locks to avoid
201 that certain important operations
202 (such as CD burning or suchlike) are
203 interrupted by system shutdown or a
204 sleep state. Any user may take these
205 locks and privileged users may
206 override these locks. If any locks are
207 taken, shutdown and sleep state
208 requests will normally fail
209 (regardless if privileged or not) and
210 list of active locks is
211 printed. However if
212 <option>--ignore-inhibitors</option>
213 is specified the locks are ignored and
214 not printed, and the operation
215 attempted anyway, possibly requiring
216 additional
217 privileges.</para></listitem>
218 </varlistentry>
219
220 <varlistentry>
221 <term><option>-q</option></term>
222 <term><option>--quiet</option></term>
223
224 <listitem><para>Suppress output to
225 STDOUT in
226 <command>snapshot</command>,
227 <command>is-active</command>,
228 <command>is-failed</command>,
229 <command>enable</command> and
230 <command>disable</command>.</para></listitem>
231 </varlistentry>
232
233 <varlistentry>
234 <term><option>--no-block</option></term>
235
236 <listitem><para>Do not synchronously wait for
237 the requested operation to finish. If this is
238 not specified the job will be verified,
239 enqueued and <command>systemctl</command> will
240 wait until it is completed. By passing this
241 argument it is only verified and
242 enqueued.</para></listitem>
243 </varlistentry>
244
245 <varlistentry>
246 <term><option>--no-legend</option></term>
247
248 <listitem><para>Do not print a legend, i.e.
249 the column headers and the footer with hints.
250 </para></listitem>
251 </varlistentry>
252
253 <varlistentry>
254 <term><option>--no-pager</option></term>
255
256 <listitem><para>Do not pipe output into a
257 pager.</para></listitem>
258 </varlistentry>
259
260 <varlistentry>
261 <term><option>--system</option></term>
262
263 <listitem><para>Talk to the systemd
264 system manager. (Default)</para></listitem>
265 </varlistentry>
266
267 <varlistentry>
268 <term><option>--user</option></term>
269
270 <listitem><para>Talk to the systemd
271 manager of the calling user.</para></listitem>
272 </varlistentry>
273
274 <varlistentry>
275 <term><option>--order</option></term>
276 <term><option>--require</option></term>
277
278 <listitem><para>When used in
279 conjunction with the
280 <command>dot</command> command (see
281 below), selects which dependencies are
282 shown in the dependency graph. If
283 <option>--order</option> is passed
284 only dependencies of type
285 <varname>After=</varname> or
286 <varname>Before=</varname> are
287 shown. If <option>--require</option>
288 is passed only dependencies of type
289 <varname>Requires=</varname>,
290 <varname>RequiresOverridable=</varname>,
291 <varname>Requisite=</varname>,
292 <varname>RequisiteOverridable=</varname>,
293 <varname>Wants=</varname> and
294 <varname>Conflicts=</varname> are
295 shown. If neither is passed, shows
296 dependencies of all these
297 types.</para></listitem>
298 </varlistentry>
299
300 <varlistentry>
301 <term><option>--no-wall</option></term>
302
303 <listitem><para>Don't send wall
304 message before
305 halt, power-off, reboot.</para></listitem>
306 </varlistentry>
307
308 <varlistentry>
309 <term><option>--global</option></term>
310
311 <listitem><para>When used with
312 <command>enable</command> and
313 <command>disable</command>, operate on the
314 global user configuration
315 directory, thus enabling or disabling
316 a unit file globally for all future
317 logins of all users.</para></listitem>
318 </varlistentry>
319
320 <varlistentry>
321 <term><option>--no-reload</option></term>
322
323 <listitem><para>When used with
324 <command>enable</command> and
325 <command>disable</command>, do not
326 implicitly reload daemon configuration
327 after executing the
328 changes.</para></listitem>
329 </varlistentry>
330
331 <varlistentry>
332 <term><option>--no-ask-password</option></term>
333
334 <listitem><para>When used with
335 <command>start</command> and related
336 commands, disables asking for
337 passwords. Background services may
338 require input of a password or
339 passphrase string, for example to
340 unlock system hard disks or
341 cryptographic certificates. Unless
342 this option is specified and the
343 command is invoked from a terminal
344 <command>systemctl</command> will
345 query the user on the terminal for the
346 necessary secrets. Use this option to
347 switch this behavior off. In this case
348 the password must be supplied by some
349 other means (for example graphical
350 password agents) or the service might
351 fail. This also disables querying the
352 user for authentication for privileged
353 operations.</para></listitem>
354 </varlistentry>
355
356 <varlistentry>
357 <term><option>--kill-who=</option></term>
358
359 <listitem><para>When used with
360 <command>kill</command>, choose which
361 processes to kill. Must be one of
362 <option>main</option>,
363 <option>control</option> or
364 <option>all</option> to select whether
365 to kill only the main process of the
366 unit, the control process or all
367 processes of the unit. If omitted
368 defaults to
369 <option>all</option>.</para></listitem>
370 </varlistentry>
371
372 <varlistentry>
373 <term><option>-s</option></term>
374 <term><option>--signal=</option></term>
375
376 <listitem><para>When used with
377 <command>kill</command>, choose which
378 signal to send to selected
379 processes. Must be one of the well
380 known signal specifiers such as
381 SIGTERM, SIGINT or SIGSTOP. If
382 omitted defaults to
383 <option>SIGTERM</option>.</para></listitem>
384 </varlistentry>
385
386 <varlistentry>
387 <term><option>-f</option></term>
388 <term><option>--force</option></term>
389
390 <listitem><para>When used with
391 <command>enable</command>, overwrite any
392 existing conflicting
393 symlinks.</para></listitem>
394
395 <listitem><para>When used with
396 <command>halt</command>,
397 <command>poweroff</command>,
398 <command>reboot</command> or
399 <command>kexec</command> execute the
400 selected operation without shutting
401 down all units. However, all processes
402 will be killed forcibly and all file
403 systems are unmounted or remounted
404 read-only. This is hence a drastic but
405 relatively safe option to request an
406 immediate reboot. If
407 <option>--force</option> is specified
408 twice for these operations, they will
409 be executed immediately without
410 terminating any processes or umounting
411 any file systems. Warning: specifying
412 <option>--force</option> twice with
413 any of these operations might result
414 in data loss.</para></listitem>
415 </varlistentry>
416
417 <varlistentry>
418 <term><option>--root=</option></term>
419
420 <listitem><para>When used with
421 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
422 related commands), use alternative
423 root path when looking for unit
424 files.</para></listitem>
425 </varlistentry>
426
427 <varlistentry>
428 <term><option>--runtime</option></term>
429
430 <listitem><para>When used with
431 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
432 changes only temporarily, so that they
433 are dropped on the next reboot. This
434 will have the effect that changes are
435 not made in subdirectories of
436 <filename>/etc</filename> but in
437 <filename>/run</filename>, with
438 identical immediate effects, however,
439 since the latter is lost on reboot,
440 the changes are lost
441 too.</para></listitem>
442 </varlistentry>
443
444 <varlistentry>
445 <term><option>-H</option></term>
446 <term><option>--host</option></term>
447
448 <listitem><para>Execute operation
449 remotely. Specify a hostname, or
450 username and hostname separated by @,
451 to connect to. This will use SSH to
452 talk to the remote systemd
453 instance.</para></listitem>
454 </varlistentry>
455
456 <varlistentry>
457 <term><option>-P</option></term>
458 <term><option>--privileged</option></term>
459
460 <listitem><para>Acquire privileges via
461 PolicyKit before executing the
462 operation.</para></listitem>
463 </varlistentry>
464
465 <varlistentry>
466 <term><option>-n</option></term>
467 <term><option>--lines=</option></term>
468
469 <listitem><para>When used with
470 <command>status</command> controls the
471 number of journal lines to show,
472 counting from the most recent
473 ones. Takes a positive integer
474 argument. Defaults to
475 10.</para></listitem>
476 </varlistentry>
477
478 <varlistentry>
479 <term><option>-o</option></term>
480 <term><option>--output=</option></term>
481
482 <listitem><para>When used with
483 <command>status</command> controls the
484 formatting of the journal entries that
485 are shown. For the available choices
486 see
487 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
488 to
489 <literal>short</literal>.</para></listitem>
490 </varlistentry>
491
492 </variablelist>
493
494 <para>The following commands are understood:</para>
495
496 <variablelist>
497 <varlistentry>
498 <term><command>list-units</command></term>
499
500 <listitem><para>List known units.</para></listitem>
501 </varlistentry>
502 <varlistentry>
503 <term><command>start [NAME...]</command></term>
504
505 <listitem><para>Start (activate) one
506 or more units specified on the command
507 line.</para></listitem>
508 </varlistentry>
509 <varlistentry>
510 <term><command>stop [NAME...]</command></term>
511
512 <listitem><para>Stop (deactivate) one
513 or more units specified on the command
514 line.</para></listitem>
515 </varlistentry>
516 <varlistentry>
517 <term><command>reload [NAME...]</command></term>
518
519 <listitem><para>Asks all units listed
520 on the command line to reload their
521 configuration. Note that this will
522 reload the service-specific
523 configuration, not the unit
524 configuration file of systemd. If you
525 want systemd to reload the
526 configuration file of a unit use the
527 <command>daemon-reload</command>
528 command. In other words: for the
529 example case of Apache, this will
530 reload Apache's
531 <filename>httpd.conf</filename> in the
532 web server, not the
533 <filename>apache.service</filename>
534 systemd unit file. </para>
535
536 <para>This command should not be
537 confused with the
538 <command>daemon-reload</command> or
539 <command>load</command>
540 commands.</para></listitem>
541
542 </varlistentry>
543 <varlistentry>
544 <term><command>restart [NAME...]</command></term>
545
546 <listitem><para>Restart one or more
547 units specified on the command
548 line. If the units are not running yet
549 they will be
550 started.</para></listitem>
551 </varlistentry>
552 <varlistentry>
553 <term><command>try-restart [NAME...]</command></term>
554
555 <listitem><para>Restart one or more
556 units specified on the command
557 line if the units are running. Do
558 nothing if units are not running.
559 Note that for compatibility
560 with Red Hat init scripts
561 <command>condrestart</command> is
562 equivalent to this command.</para></listitem>
563 </varlistentry>
564 <varlistentry>
565 <term><command>reload-or-restart [NAME...]</command></term>
566
567 <listitem><para>Reload one or more
568 units if they support it. If not,
569 restart them instead. If the units
570 are not running yet they will be
571 started.</para></listitem>
572 </varlistentry>
573 <varlistentry>
574 <term><command>reload-or-try-restart [NAME...]</command></term>
575
576 <listitem><para>Reload one or more
577 units if they support it. If not,
578 restart them instead. Do nothing if
579 the units are not running. Note that
580 for compatibility with SysV init
581 scripts
582 <command>force-reload</command> is
583 equivalent to this
584 command.</para></listitem>
585 </varlistentry>
586 <varlistentry>
587 <term><command>isolate [NAME]</command></term>
588
589 <listitem><para>Start the unit
590 specified on the command line and its
591 dependencies and stop all others.</para>
592
593 <para>This is similar to changing the
594 runlevel in a traditional init system. The
595 <command>isolate</command> command will
596 immediately stop processes that are not
597 enabled in the new unit, possibly including
598 the graphical environment or terminal you
599 are currently using.</para>
600
601 <para>Note that this works only on units
602 where <option>AllowIsolate=</option> is
603 enabled. See
604 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
605 for details.</para></listitem>
606 </varlistentry>
607 <varlistentry>
608 <term><command>kill [NAME...]</command></term>
609
610 <listitem><para>Send a signal to one
611 or more processes of the unit. Use
612 <option>--kill-who=</option> to select
613 which process to kill. Use
614 <option>--kill-mode=</option> to
615 select the kill mode and
616 <option>--signal=</option> to select
617 the signal to send.</para></listitem>
618 </varlistentry>
619 <varlistentry>
620 <term><command>is-active [NAME...]</command></term>
621
622 <listitem><para>Check whether any of
623 the specified units are active
624 (i.e. running). Returns an exit code
625 0 if at least one is active, non-zero
626 otherwise. Unless
627 <option>--quiet</option> is specified
628 this will also print the current unit
629 state to STDOUT.</para></listitem>
630 </varlistentry>
631 <varlistentry>
632 <term><command>is-failed [NAME...]</command></term>
633
634 <listitem><para>Check whether any of
635 the specified units are failed.
636 Returns an exit code
637 0 if at least one is failed, non-zero
638 otherwise. Unless
639 <option>--quiet</option> is specified
640 this will also print the current unit
641 state to STDOUT.</para></listitem>
642 </varlistentry>
643 <varlistentry>
644 <term><command>status [NAME...|PID...]</command></term>
645
646 <listitem><para>Show terse runtime
647 status information about one or more
648 units, followed by its most recent log
649 data from the journal. This function
650 is intended to generate human-readable
651 output. If you are looking for
652 computer-parsable output, use
653 <command>show</command> instead. If a
654 PID is passed information about the
655 unit the process of the PID belongs to
656 is shown.</para></listitem>
657 </varlistentry>
658 <varlistentry>
659 <term><command>show [NAME...|JOB...]</command></term>
660
661 <listitem><para>Show properties of one
662 or more units, jobs or the manager
663 itself. If no argument is specified
664 properties of the manager will be
665 shown. If a unit name is specified
666 properties of the unit is shown, and
667 if a job id is specified properties of
668 the job is shown. By default, empty
669 properties are suppressed. Use
670 <option>--all</option> to show those
671 too. To select specific properties to
672 show use
673 <option>--property=</option>. This
674 command is intended to be used
675 whenever computer-parsable output is
676 required. Use
677 <command>status</command> if you are
678 looking for formatted human-readable
679 output.</para></listitem>
680 </varlistentry>
681 <varlistentry>
682 <term><command>help [NAME...|PID...]</command></term>
683
684 <listitem><para>Show manual pages for
685 one or more units, if available. If a
686 PID is passed the manual pages for the
687 unit the process of the PID belongs to
688 is shown.</para></listitem>
689 </varlistentry>
690 <varlistentry>
691 <term><command>reset-failed [NAME...]</command></term>
692
693 <listitem><para>Reset the
694 '<literal>failed</literal>' state of the
695 specified units, or if no unit name is
696 passed of all units. When a unit fails
697 in some way (i.e. process exiting with
698 non-zero error code, terminating
699 abnormally or timing out) it will
700 automatically enter the
701 '<literal>failed</literal>' state and
702 its exit code and status is recorded
703 for introspection by the administrator
704 until the service is restarted or
705 reset with this
706 command.</para></listitem>
707 </varlistentry>
708
709 <varlistentry>
710 <term><command>list-unit-files</command></term>
711
712 <listitem><para>List installed unit files.
713 </para></listitem>
714 </varlistentry>
715
716 <varlistentry>
717 <term><command>enable [NAME...]</command></term>
718
719 <listitem><para>Enable one or
720 more unit files or unit file
721 instances, as specified on the
722 command line. This will create a
723 number of symlinks as encoded in
724 the <literal>[Install]</literal>
725 sections of the unit files. After
726 the symlinks have been created the
727 systemd configuration is reloaded
728 (in a way that is equivalent to
729 <command>daemon-reload</command>)
730 to ensure the changes are taken into
731 account immediately. Note that this
732 does not have the effect that any of
733 the units enabled are also started at
734 the same time. If this is desired
735 a separate <command>start</command>
736 command must be invoked for the unit.
737 Also note that in case of instance
738 enablement, symlinks named same as
739 instances are created in install
740 location, however they all point to
741 the same template unit file.</para>
742
743 <para>This command will
744 print the actions executed. This
745 output may be suppressed by passing
746 <option>--quiet</option>.</para>
747
748 <para>Note that this operation creates
749 only the suggested symlinks for the
750 units. While this command is the
751 recommended way to manipulate the unit
752 configuration directory, the
753 administrator is free to make
754 additional changes manually, by
755 placing or removing symlinks in the
756 directory. This is particularly useful
757 to create configurations that deviate
758 from the suggested default
759 installation. In this case the
760 administrator must make sure to invoke
761 <command>daemon-reload</command>
762 manually as necessary, to ensure his
763 changes are taken into account.</para>
764
765 <para>Enabling units should not be
766 confused with starting (activating)
767 units, as done by the
768 <command>start</command>
769 command. Enabling and starting units
770 is orthogonal: units may be enabled
771 without being started and started
772 without being enabled. Enabling simply
773 hooks the unit into various suggested
774 places (for example, so that the unit
775 is automatically started on boot or
776 when a particular kind of hardware is
777 plugged in). Starting actually spawns
778 the daemon process (in case of service
779 units), or binds the socket (in case
780 of socket units), and so
781 on.</para>
782
783 <para>Depending on whether
784 <option>--system</option>,
785 <option>--user</option> or
786 <option>--global</option> is specified
787 this enables the unit for the system,
788 for the calling user only
789 or for all future logins of all
790 users. Note that in the latter case no
791 systemd daemon configuration is
792 reloaded.</para>
793 </listitem>
794 </varlistentry>
795
796 <varlistentry>
797 <term><command>disable [NAME...]</command></term>
798
799 <listitem><para>Disables one or more
800 units. This removes all symlinks to
801 the specified unit files from the unit
802 configuration directory, and hence
803 undoes the changes made by
804 <command>enable</command>. Note
805 however that this removes
806 all symlinks to the unit files
807 (i.e. including manual additions), not
808 just those actually created by
809 <command>enable</command>. This call
810 implicitly reloads the systemd daemon
811 configuration after completing the
812 disabling of the units. Note that this
813 command does not implicitly stop the
814 units that are being disabled. If this
815 is desired an additional
816 <command>stop</command> command should
817 be executed afterwards.</para>
818
819 <para>This command will print the
820 actions executed. This output may be
821 suppressed by passing
822 <option>--quiet</option>.</para>
823 </listitem>
824
825 <para>This command honors
826 <option>--system</option>,
827 <option>--user</option>,
828 <option>--global</option> in a similar
829 way as
830 <command>enable</command>.</para>
831 </varlistentry>
832
833 <varlistentry>
834 <term><command>is-enabled [NAME...]</command></term>
835
836 <listitem><para>Checks whether any of
837 the specified unit files are enabled
838 (as with
839 <command>enable</command>). Returns an
840 exit code of 0 if at least one is
841 enabled, non-zero otherwise. Prints
842 the current enable status. To suppress
843 this output use
844 <option>--quiet</option>.</para></listitem>
845 </varlistentry>
846
847 <varlistentry>
848 <term><command>reenable [NAME...]</command></term>
849
850 <listitem><para>Reenable one or more
851 unit files, as specified on the
852 command line. This is a combination of
853 <command>disable</command> and
854 <command>enable</command> and is
855 useful to reset the symlinks a unit is
856 enabled with to the defaults
857 configured in the
858 <literal>[Install]</literal> section
859 of the unit file.</para>
860 </listitem>
861 </varlistentry>
862
863 <varlistentry>
864 <term><command>preset [NAME...]</command></term>
865
866 <listitem><para>Reset one or more unit
867 files, as specified on the command
868 line, to the defaults configured in
869 the preset policy files. This has the
870 same effect as
871 <command>disable</command> or
872 <command>enable</command>, depending
873 how the unit is listed in the preset
874 files. For more information on preset
875 policy format see
876 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
877 more information on the concept of
878 presets please consult the <ulink
879 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
880 document.</para>
881 </listitem>
882 </varlistentry>
883
884 <varlistentry>
885 <term><command>mask [NAME...]</command></term>
886
887 <listitem><para>Mask one or more unit
888 files, as specified on the command
889 line. This will link these units to
890 <filename>/dev/null</filename>, making
891 it impossible to start them. This is a stronger version
892 of <command>disable</command>, since
893 it prohibits all kinds of activation
894 of the unit, including manual
895 activation. Use this option with
896 care.</para>
897 </listitem>
898 </varlistentry>
899
900 <varlistentry>
901 <term><command>unmask [NAME...]</command></term>
902
903 <listitem><para>Unmask one or more
904 unit files, as specified on the
905 command line. This will undo the
906 effect of
907 <command>mask</command>.</para>
908 </listitem>
909 </varlistentry>
910
911 <varlistentry>
912 <term><command>link [NAME...]</command></term>
913
914 <listitem><para>Link a unit file that
915 is not in the unit file search paths
916 into the unit file search path. This
917 requires an absolute path to a unit
918 file. The effect of this can be undone
919 with <command>disable</command>. The
920 effect of this command is that a unit
921 file is available for
922 <command>start</command> and other
923 commands although it isn't installed
924 directly in the unit search
925 path.</para>
926 </listitem>
927 </varlistentry>
928
929 <varlistentry>
930 <term><command>load [NAME...]</command></term>
931
932 <listitem><para>Load one or more units
933 specified on the command line. This
934 will simply load their configuration
935 from disk, but not start them. To
936 start them you need to use the
937 <command>start</command> command which
938 will implicitly load a unit that has
939 not been loaded yet. Note that systemd
940 garbage collects loaded units that are
941 not active or referenced by an active
942 unit. This means that units loaded
943 this way will usually not stay loaded
944 for long. Also note that this command
945 cannot be used to reload unit
946 configuration. Use the
947 <command>daemon-reload</command>
948 command for that. All in all, this
949 command is of little use except for
950 debugging.</para>
951 <para>This command should not be
952 confused with the
953 <command>daemon-reload</command> or
954 <command>reload</command>
955 commands.</para></listitem>
956 </varlistentry>
957 <varlistentry>
958 <term><command>list-jobs</command></term>
959
960 <listitem><para>List jobs that are in progress.</para></listitem>
961 </varlistentry>
962 <varlistentry>
963 <term><command>cancel [JOB...]</command></term>
964
965 <listitem><para>Cancel one or more
966 jobs specified on the command line by
967 their numeric job
968 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
969 </varlistentry>
970 <varlistentry>
971 <term><command>dump</command></term>
972
973 <listitem><para>Dump server
974 status. This will output a (usually
975 very long) human readable manager
976 status dump. Its format is subject to
977 change without notice and should not
978 be parsed by
979 applications.</para></listitem>
980 </varlistentry>
981 <varlistentry>
982 <term><command>dot</command></term>
983
984 <listitem><para>Generate textual
985 dependency graph description in dot
986 format for further processing with the
987 GraphViz
988 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
989 tool. Use a command line like
990 <command>systemctl dot | dot -Tsvg >
991 systemd.svg</command> to generate a
992 graphical dependency tree. Unless
993 <option>--order</option> or
994 <option>--require</option> is passed
995 the generated graph will show both
996 ordering and requirement
997 dependencies.</para></listitem>
998 </varlistentry>
999 <varlistentry>
1000 <term><command>list-dependencies [NAME]</command></term>
1001
1002 <listitem><para> Shows required and
1003 wanted units of the specified unit. If
1004 no unit is specified
1005 <filename>default.target</filename> is
1006 implied. Target units are recursively
1007 expanded. When <option>--all</option>
1008 is passed all other units aare
1009 recursively expanded as well.</para>
1010 </listitem>
1011 </varlistentry>
1012 <varlistentry>
1013 <term><command>snapshot [NAME]</command></term>
1014
1015 <listitem><para>Create a snapshot. If
1016 a snapshot name is specified, the new
1017 snapshot will be named after it. If
1018 none is specified an automatic
1019 snapshot name is generated. In either
1020 case, the snapshot name used is
1021 printed to STDOUT, unless
1022 <option>--quiet</option> is
1023 specified.</para>
1024
1025 <para>A snapshot refers to a saved
1026 state of the systemd manager. It is
1027 implemented itself as a unit that is
1028 generated dynamically with this
1029 command and has dependencies on all
1030 units active at the time. At a later
1031 time the user may return to this state
1032 by using the
1033 <command>isolate</command> command on
1034 the snapshot unit.</para></listitem>
1035
1036 <para>Snapshots are only useful for
1037 saving and restoring which units are
1038 running or are stopped, they do not
1039 save/restore any other
1040 state. Snapshots are dynamic and lost
1041 on reboot.</para>
1042 </varlistentry>
1043 <varlistentry>
1044 <term><command>delete [NAME...]</command></term>
1045
1046 <listitem><para>Remove a snapshot
1047 previously created with
1048 <command>snapshot</command>.</para></listitem>
1049 </varlistentry>
1050 <varlistentry>
1051 <term><command>daemon-reload</command></term>
1052
1053 <listitem><para>Reload systemd manager
1054 configuration. This will reload all
1055 unit files and recreate the entire
1056 dependency tree. While the daemon is
1057 reloaded, all sockets systemd listens
1058 on on behalf of user configuration will
1059 stay accessible.</para> <para>This
1060 command should not be confused with
1061 the <command>load</command> or
1062 <command>reload</command>
1063 commands.</para></listitem>
1064 </varlistentry>
1065 <varlistentry>
1066 <term><command>daemon-reexec</command></term>
1067
1068 <listitem><para>Reexecute the systemd
1069 manager. This will serialize the
1070 manager state, reexecute the process
1071 and deserialize the state again. This
1072 command is of little use except for
1073 debugging and package
1074 upgrades. Sometimes it might be
1075 helpful as a heavy-weight
1076 <command>daemon-reload</command>. While
1077 the daemon is reexecuted all sockets
1078 systemd listens on on behalf of user
1079 configuration will stay
1080 accessible.</para></listitem>
1081 </varlistentry>
1082 <varlistentry>
1083 <term><command>show-environment</command></term>
1084
1085 <listitem><para>Dump the systemd
1086 manager environment block. The
1087 environment block will be dumped in
1088 straight-forward form suitable for
1089 sourcing into a shell script. This
1090 environment block will be passed to
1091 all processes the manager
1092 spawns.</para></listitem>
1093 </varlistentry>
1094 <varlistentry>
1095 <term><command>set-environment [NAME=VALUE...]</command></term>
1096
1097 <listitem><para>Set one or more
1098 systemd manager environment variables,
1099 as specified on the command
1100 line.</para></listitem>
1101 </varlistentry>
1102 <varlistentry>
1103 <term><command>unset-environment [NAME...]</command></term>
1104
1105 <listitem><para>Unset one or more
1106 systemd manager environment
1107 variables. If only a variable name is
1108 specified it will be removed
1109 regardless of its value. If a variable
1110 and a value are specified the variable
1111 is only removed if it has the
1112 specified value.</para></listitem>
1113 </varlistentry>
1114 <varlistentry>
1115 <term><command>default</command></term>
1116
1117 <listitem><para>Enter default
1118 mode. This is mostly equivalent to
1119 <command>start
1120 default.target</command>.</para></listitem>
1121 </varlistentry>
1122 <varlistentry>
1123 <term><command>rescue</command></term>
1124
1125 <listitem><para>Enter rescue
1126 mode. This is mostly equivalent to
1127 <command>isolate
1128 rescue.target</command> but also
1129 prints a wall message to all
1130 users.</para></listitem>
1131 </varlistentry>
1132 <varlistentry>
1133 <term><command>emergency</command></term>
1134
1135 <listitem><para>Enter emergency
1136 mode. This is mostly equivalent to
1137 <command>isolate
1138 emergency.target</command> but also
1139 prints a wall message to all
1140 users.</para></listitem>
1141 </varlistentry>
1142 <varlistentry>
1143 <term><command>halt</command></term>
1144
1145 <listitem><para>Shut down and halt the
1146 system. This is mostly equivalent to
1147 <command>start halt.target</command>
1148 but also prints a wall message to all
1149 users. If combined with
1150 <option>--force</option> shutdown of
1151 all running services is skipped,
1152 however all processes are killed and
1153 all file systems are unmounted or
1154 mounted read-only, immediately
1155 followed by the system halt. If
1156 <option>--force</option> is specified
1157 twice the operation is immediately
1158 executed without terminating any
1159 processes or unmounting any file
1160 systems. This may result in data
1161 loss.</para></listitem>
1162 </varlistentry>
1163 <varlistentry>
1164 <term><command>poweroff</command></term>
1165
1166 <listitem><para>Shut down and
1167 power-off the system. This is mostly
1168 equivalent to <command>start
1169 poweroff.target</command> but also
1170 prints a wall message to all users. If
1171 combined with <option>--force</option>
1172 shutdown of all running services is
1173 skipped, however all processes are
1174 killed and all file systems are
1175 unmounted or mounted read-only,
1176 immediately followed by the powering
1177 off. If <option>--force</option> is
1178 specified twice the operation is
1179 immediately executed without
1180 terminating any processes or
1181 unmounting any file systems. This may
1182 result in data loss.</para></listitem>
1183 </varlistentry>
1184 <varlistentry>
1185 <term><command>reboot</command></term>
1186
1187 <listitem><para>Shut down and reboot
1188 the system. This is mostly equivalent
1189 to <command>start
1190 reboot.target</command> but also
1191 prints a wall message to all users. If
1192 combined with <option>--force</option>
1193 shutdown of all running services is
1194 skipped, however all processes are
1195 killed and all file systems are
1196 unmounted or mounted read-only,
1197 immediately followed by the reboot. If
1198 <option>--force</option> is specified
1199 twice the operation is immediately
1200 executed without terminating any
1201 processes or unmounting any file
1202 systems. This may result in data
1203 loss.</para></listitem>
1204 </varlistentry>
1205 <varlistentry>
1206 <term><command>kexec</command></term>
1207
1208 <listitem><para>Shut down and reboot
1209 the system via kexec. This is mostly
1210 equivalent to <command>start
1211 kexec.target</command> but also prints
1212 a wall message to all users. If
1213 combined with <option>--force</option>
1214 shutdown of all running services is
1215 skipped, however all processes are killed
1216 and all file systems are unmounted or
1217 mounted read-only, immediately
1218 followed by the
1219 reboot.</para></listitem>
1220 </varlistentry>
1221 <varlistentry>
1222 <term><command>exit</command></term>
1223
1224 <listitem><para>Ask the systemd
1225 manager to quit. This is only
1226 supported for user service managers
1227 (i.e. in conjunction with the
1228 <option>--user</option> option) and
1229 will fail otherwise.</para></listitem>
1230 </varlistentry>
1231 <varlistentry>
1232 <term><command>suspend</command></term>
1233
1234 <listitem><para>Suspend the
1235 system. This will trigger activation
1236 of the special
1237 <filename>suspend.target</filename>
1238 target.</para></listitem>
1239 </varlistentry>
1240 <varlistentry>
1241 <term><command>hibernate</command></term>
1242
1243 <listitem><para>Hibernate the
1244 system. This will trigger activation
1245 of the special
1246 <filename>hibernate.target</filename>
1247 target.</para></listitem>
1248 </varlistentry>
1249 <varlistentry>
1250 <term><command>hybrid-sleep</command></term>
1251
1252 <listitem><para>Hibernate and suspend
1253 the system. This will trigger
1254 activation of the special
1255 <filename>hybrid-sleep.target</filename>
1256 target.</para></listitem>
1257 </varlistentry>
1258 <varlistentry>
1259 <term><command>switch-root [ROOT] [INIT]</command></term>
1260
1261 <listitem><para>Switches to a
1262 different root directory and executes
1263 a new system manager process below
1264 it. This is intended for usage in
1265 initial RAM disks ("initrd"), and will
1266 transition from the initrd's system
1267 manager process (a.k.a "init" process)
1268 to the main system manager
1269 process. Takes two arguments: the
1270 directory to make the new root
1271 directory, and the path to the new
1272 system manager binary below it to
1273 execute as PID 1. If the latter is
1274 omitted or the empty string, a
1275 systemd binary will automatically be
1276 searched for and used as init. If the
1277 system manager path is omitted or
1278 equal the empty string the state of
1279 the initrd's system manager process is
1280 passed to the main system manager,
1281 which allows later introspection of the
1282 state of the services involved in the
1283 initrd boot.</para></listitem>
1284 </varlistentry>
1285 </variablelist>
1286
1287 </refsect1>
1288
1289 <refsect1>
1290 <title>Exit status</title>
1291
1292 <para>On success 0 is returned, a non-zero failure
1293 code otherwise.</para>
1294 </refsect1>
1295
1296 <refsect1>
1297 <title>Environment</title>
1298
1299 <variablelist class='environment-variables'>
1300 <varlistentry>
1301 <term><varname>$SYSTEMD_PAGER</varname></term>
1302 <listitem><para>Pager to use when
1303 <option>--no-pager</option> is not given;
1304 overrides <varname>$PAGER</varname>. Setting
1305 this to an empty string or the value
1306 <literal>cat</literal> is equivalent to passing
1307 <option>--no-pager</option>.</para></listitem>
1308 </varlistentry>
1309 </variablelist>
1310 </refsect1>
1311
1312 <refsect1>
1313 <title>See Also</title>
1314 <para>
1315 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1316 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1317 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1318 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1319 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1320 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1321 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1322 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1323 </para>
1324 </refsect1>
1325
1326 </refentry>