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