]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemctl.xml
dbus: send our finished signal when we are finished booting
[thirdparty/systemd.git] / man / systemctl.xml
CommitLineData
7874bcd6
LP
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 General Public License as published by
12 the Free Software Foundation; either version 2 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 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
ee5762e3 24<refentry id="systemctl">
7874bcd6
LP
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>
af2d49f7 47 <refpurpose>Control the systemd system and service manager</refpurpose>
7874bcd6
LP
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>
af2d49f7 62 system and service manager.</para>
7874bcd6
LP
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>
7594fb25 73 <term><option>-h</option></term>
7874bcd6
LP
74
75 <listitem><para>Prints a short help
76 text and exits.</para></listitem>
77 </varlistentry>
78
59cddb23
LP
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
7874bcd6
LP
86 <varlistentry>
87 <term><option>--type=</option></term>
7594fb25 88 <term><option>-t</option></term>
7874bcd6
LP
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
393a2f9b
LP
100 <varlistentry>
101 <term><option>--property=</option></term>
102 <term><option>-p</option></term>
103
104 <listitem><para>When showing
105 unit/job/manager information, limit
ee5762e3
LP
106 display to certain properties as
107 specified as argument. If not
108 specified all set properties are
393a2f9b
LP
109 shown. The argument should be a
110 property name, such as
ea4a240d
LP
111 <literal>MainPID</literal>. If
112 specified more than once all
113 properties with the specified names
114 are shown.</para></listitem>
393a2f9b
LP
115 </varlistentry>
116
7874bcd6
LP
117 <varlistentry>
118 <term><option>--all</option></term>
7594fb25 119 <term><option>-a</option></term>
7874bcd6
LP
120
121 <listitem><para>When listing units,
122 show all units, regardless of their
393a2f9b
LP
123 state, including inactive units. When
124 showing unit/job/manager information,
125 show all properties regardless whether
126 they are set or not.</para></listitem>
7874bcd6
LP
127 </varlistentry>
128
30732560
LP
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
8fe914ec
LP
138 <varlistentry>
139 <term><option>--full</option></term>
140
141 <listitem><para>Do not ellipsize unit
f73e33d9
LP
142 names and truncate unit descriptions
143 in the output of
8fe914ec
LP
144 <command>list-units</command> and
145 <command>list-jobs</command>.</para></listitem>
146 </varlistentry>
147
7874bcd6 148 <varlistentry>
90d473a1 149 <term><option>--fail</option></term>
7874bcd6
LP
150
151 <listitem><para>If the requested
ee5762e3
LP
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,
30732560
LP
156 if necessary. Do not confuse
157 with
158 <option>--failed</option>.</para></listitem>
ee5762e3
LP
159 </varlistentry>
160
e67c3609
LP
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
ee5762e3
LP
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>,
3d428115 183 <command>is-active</command>,
ee5762e3
LP
184 <command>enable</command> and
185 <command>disable</command>.</para></listitem>
186 </varlistentry>
187
188 <varlistentry>
189 <term><option>--no-block</option></term>
190
a9c72fe9
LP
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> </varlistentry>
ee5762e3 198
0736af98
MV
199 <varlistentry>
200 <term><option>--no-pager</option></term>
201
202 <listitem><para>Do not pipe output into a
203 pager.</para></listitem>
204 </varlistentry>
205
ee5762e3
LP
206 <varlistentry>
207 <term><option>--system</option></term>
208
209 <listitem><para>Talk to the systemd
210 system manager. (Default)</para></listitem>
211 </varlistentry>
212
213 <varlistentry>
af2d49f7 214 <term><option>--user</option></term>
ee5762e3
LP
215
216 <listitem><para>Talk to the systemd
af2d49f7 217 manager of the calling user.</para></listitem>
7874bcd6
LP
218 </varlistentry>
219
4445a875
LP
220 <varlistentry>
221 <term><option>--order</option></term>
222 <term><option>--require</option></term>
223
224 <listitem><para>When used in
225 conjunction with the
226 <command>dot</command> command (see
227 below), selects which dependencies are
228 shown in the dependency graph. If
229 <option>--order</option> is passed
230 only dependencies of type
231 <varname>After=</varname> or
232 <varname>Before=</varname> are
233 shown. If <option>--require</option>
234 is passed only dependencies of type
235 <varname>Requires=</varname>,
236 <varname>RequiresOverridable=</varname>,
237 <varname>Requisite=</varname>,
238 <varname>RequisiteOverridable=</varname>,
239 <varname>Wants=</varname> and
240 <varname>Conflicts=</varname> are
241 shown. If neither is passed, shows
242 dependencies of all these
243 types.</para></listitem>
244 </varlistentry>
245
7874bcd6 246 <varlistentry>
ee5762e3 247 <term><option>--no-wall</option></term>
7874bcd6 248
ee5762e3
LP
249 <listitem><para>Don't send wall
250 message before
251 halt, power-off, reboot.</para></listitem>
7874bcd6
LP
252 </varlistentry>
253
254 <varlistentry>
ee5762e3
LP
255 <term><option>--global</option></term>
256
257 <listitem><para>When used with
258 <command>enable</command> and
259 <command>disable</command>, operate on the
3d428115 260 global user configuration
ee5762e3
LP
261 directory, thus enabling or disabling
262 a unit file globally for all future
af2d49f7 263 logins of all users.</para></listitem>
7874bcd6
LP
264 </varlistentry>
265
266 <varlistentry>
ee5762e3
LP
267 <term><option>--no-reload</option></term>
268
269 <listitem><para>When used with
270 <command>enable</command> and
271 <command>disable</command>, do not
272 implicitly reload daemon configuration
273 after executing the
274 changes.</para></listitem>
275 </varlistentry>
7594fb25 276
501fc174
LP
277 <varlistentry>
278 <term><option>--no-ask-password</option></term>
279
280 <listitem><para>When used with
281 <command>start</command> and related
282 commands, disables asking for
283 passwords. Background services may
284 require input of a password or
285 passphrase string, for example to
286 unlock system hard disks or
287 cryptographic certificates. Unless
288 this option is specified and the
289 command is invoked from a terminal
290 <command>systemctl</command> will
291 query the user on the terminal for the
292 necessary secrets. Use this option to
3d428115 293 switch this behavior off. In this
501fc174
LP
294 case the password must be supplied by
295 some other means (for example
296 graphical password agents) or the
297 service might fail.</para></listitem>
298 </varlistentry>
299
8a0867d6
LP
300 <varlistentry>
301 <term><option>--kill-mode=</option></term>
302
303 <listitem><para>When used with
304 <command>kill</command>, choose the
305 mode how to kill the selected
306 processes. Must be one of
cd25cce9 307 <option>control-group</option> or
8a0867d6
LP
308 <option>process</option> to select
309 whether to kill the entire control
cd25cce9
LP
310 group or only the selected process
311 itself. If omitted defaults to
8a0867d6
LP
312 <option>control-group</option> if
313 <option>--kill-who=all</option> is
314 set, or <option>process</option>
315 otherwise. You probably never need to
316 use this switch.</para></listitem>
317 </varlistentry>
318
319 <varlistentry>
320 <term><option>--kill-who=</option></term>
321
322 <listitem><para>When used with
323 <command>kill</command>, choose which
324 processes to kill. Must be one of
325 <option>main</option>,
326 <option>control</option> or
327 <option>all</option> to select whether
328 to kill only the main process of the
329 unit, the control process or all
3d428115 330 processes of the unit. If omitted
8a0867d6
LP
331 defaults to
332 <option>all</option>.</para></listitem>
333 </varlistentry>
334
335 <varlistentry>
3d428115 336 <term><option>--signal=</option></term>
8a0867d6
LP
337 <term><option>-s</option></term>
338
339 <listitem><para>When used with
340 <command>kill</command>, choose which
341 signal to send to selected
342 processes. Must be one of the well
3d428115 343 known signal specifiers such as
8a0867d6 344 SIGTERM, SIGINT or SIGSTOP. If
3d428115 345 omitted defaults to
8a0867d6
LP
346 <option>SIGTERM</option>.</para></listitem>
347 </varlistentry>
348
7594fb25 349 <varlistentry>
ee5762e3 350 <term><option>--force</option></term>
6f352544 351 <term><option>-f</option></term>
7874bcd6 352
ee5762e3
LP
353 <listitem><para>When used with
354 <command>enable</command>, override any
355 existing conflicting
356 symlinks.</para></listitem>
6f352544
LP
357
358 <listitem><para>When used with
359 <command>halt</command>,
360 <command>poweroff</command>,
361 <command>reboot</command> or
362 <command>kexec</command> execute
363 selected operation without shutting
364 down all units. However, all processes
365 will be killed forcibly and all file
366 systems are unmounted or remounted
367 read-only. This is hence a drastic but
368 relatively safe option to request an
369 immediate reboot.</para></listitem>
7874bcd6
LP
370 </varlistentry>
371
372 <varlistentry>
ee5762e3
LP
373 <term><option>--defaults</option></term>
374
375 <listitem><para>When used with
376 <command>disable</command>, ensures
377 that only the symlinks created by
378 <command>enable</command> are removed,
379 not all symlinks pointing to the unit
380 file that shall be
381 disabled.</para></listitem>
7874bcd6 382 </varlistentry>
a8f11321
LP
383
384 <varlistentry>
385 <term><option>-H</option></term>
386 <term><option>--host</option></term>
387
388 <listitem><para>Execute operation
9f7dad77
VS
389 remotely. Specify a hostname, or
390 username and hostname separated by @,
a8f11321
LP
391 to connect to. This will use SSH to
392 talk to the remote systemd
393 instance.</para></listitem>
394 </varlistentry>
395
396 <varlistentry>
397 <term><option>-P</option></term>
398 <term><option>--privileged</option></term>
399
400 <listitem><para>Acquire privileges via
401 PolicyKit before executing the
402 operation.</para></listitem>
403 </varlistentry>
7874bcd6
LP
404 </variablelist>
405
406 <para>The following commands are understood:</para>
407
408 <variablelist>
409 <varlistentry>
410 <term><command>list-units</command></term>
411
412 <listitem><para>List known units.</para></listitem>
413 </varlistentry>
7874bcd6
LP
414 <varlistentry>
415 <term><command>start [NAME...]</command></term>
416
ee5762e3
LP
417 <listitem><para>Start (activate) one
418 or more units specified on the command
7874bcd6
LP
419 line.</para></listitem>
420 </varlistentry>
421 <varlistentry>
422 <term><command>stop [NAME...]</command></term>
423
ee5762e3
LP
424 <listitem><para>Stop (deactivate) one
425 or more units specified on the command
7874bcd6
LP
426 line.</para></listitem>
427 </varlistentry>
7874bcd6
LP
428 <varlistentry>
429 <term><command>reload [NAME...]</command></term>
430
ee5762e3
LP
431 <listitem><para>Asks all units listed
432 on the command line to reload their
7874bcd6 433 configuration. Note that this will
ee5762e3
LP
434 reload the service-specific
435 configuration, not the unit
436 configuration file of systemd. If you
437 want systemd to reload the
438 configuration file of a unit use the
7874bcd6
LP
439 <command>daemon-reload</command>
440 command. In other words: for the
441 example case of Apache, this will
442 reload Apache's
443 <filename>httpd.conf</filename> in the
444 web server, not the
445 <filename>apache.service</filename>
ee5762e3
LP
446 systemd unit file. </para>
447
448 <para>This command should not be
449 confused with the
450 <command>daemon-reload</command> or
451 <command>load</command>
7874bcd6
LP
452 commands.</para></listitem>
453
454 </varlistentry>
455 <varlistentry>
6f28c033
LP
456 <term><command>restart [NAME...]</command></term>
457
458 <listitem><para>Restart one or more
459 units specified on the command
460 line. If the units are not running yet
461 they will be
462 started.</para></listitem>
463 </varlistentry>
464 <varlistentry>
465 <term><command>try-restart [NAME...]</command></term>
466
467 <listitem><para>Restart one or more
468 units specified on the command
f1f8cfd0
AB
469 line if the units are running. Do
470 nothing if units are not running.
471 Note that for compatibility
9bee76ee
RB
472 with Red Hat init scripts
473 <command>condrestart</command> is
474 equivalent to this command.</para></listitem>
6f28c033
LP
475 </varlistentry>
476 <varlistentry>
477 <term><command>reload-or-restart [NAME...]</command></term>
9bee76ee
RB
478
479 <listitem><para>Reload one or more
480 units if they support it. If not,
481 restart them instead. If the units
482 are not running yet they will be
483 started.</para></listitem>
484 </varlistentry>
485 <varlistentry>
6f28c033
LP
486 <term><command>reload-or-try-restart [NAME...]</command></term>
487
488 <listitem><para>Reload one or more
ee5762e3 489 units if they support it. If not,
100fd567
LP
490 restart them instead. Do nothing if
491 the units are not running. Note that
492 for compatibility with SysV init
493 scripts
9bee76ee 494 <command>force-reload</command> is
100fd567
LP
495 equivalent to this
496 command.</para></listitem>
6f28c033
LP
497 </varlistentry>
498 <varlistentry>
7874bcd6
LP
499 <term><command>isolate [NAME]</command></term>
500
501 <listitem><para>Start the unit
502 specified on the command line and its
25f63d46
MM
503 dependencies and stop all others.</para>
504
505 <para>This is similar to changing the
506 runlevel in a traditional init system. The
507 <command>isolate</command> command will
508 immediately stop processes that are not
509 enabled in the new unit, possibly including
510 the graphical environment or terminal you
511 are currently using.</para>
512
513 <para>Note that this works only on units
514 where <option>AllowIsolate=</option> is
2528a7a6
LP
515 enabled. See
516 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
517 for details.</para></listitem>
7874bcd6 518 </varlistentry>
8a0867d6
LP
519 <varlistentry>
520 <term><command>kill [NAME...]</command></term>
521
522 <listitem><para>Send a signal to one
523 or more processes of the unit. Use
524 <option>--kill-who=</option> to select
525 which process to kill. Use
526 <option>--kill-mode=</option> to
527 select the kill mode and
528 <option>--signal=</option> to select
529 the signal to send.</para></listitem>
530 </varlistentry>
7594fb25 531 <varlistentry>
ee5762e3 532 <term><command>is-active [NAME...]</command></term>
7594fb25
LP
533
534 <listitem><para>Check whether any of
3d428115 535 the specified units are active
ee5762e3
LP
536 (i.e. running). Returns an exit code
537 0 if at least one is active, non-zero
7594fb25
LP
538 otherwise. Unless
539 <option>--quiet</option> is specified
540 this will also print the current unit
541 state to STDOUT.</para></listitem>
542 </varlistentry>
61cbdc4b 543 <varlistentry>
75676b72 544 <term><command>status [NAME...|PID...]</command></term>
61cbdc4b 545
ee5762e3
LP
546 <listitem><para>Show terse runtime
547 status information about one or more
548 units. This function is intended to
549 generate human-readable output. If you
550 are looking for computer-parsable
551 output, use <command>show</command>
75676b72
LP
552 instead. If a PID is passed
553 information about the unit the process
554 of the PID belongs to is
555 shown.</para></listitem>
61cbdc4b 556 </varlistentry>
393a2f9b
LP
557 <varlistentry>
558 <term><command>show [NAME...|JOB...]</command></term>
559
ee5762e3
LP
560 <listitem><para>Show properties of one
561 or more units, jobs or the manager
393a2f9b 562 itself. If no argument is specified
61cbdc4b 563 properties of the manager will be
393a2f9b 564 shown. If a unit name is specified
ee5762e3
LP
565 properties of the unit is shown, and
566 if a job id is specified properties of
567 the job is shown. By default, empty
568 properties are suppressed. Use
569 <option>--all</option> to show those
570 too. To select specific properties to
571 show use
572 <option>--property=</option>. This
573 command is intended to be used
574 whenever computer-parsable output is
575 required. Use
576 <command>status</command> if you are
577 looking for formatted human-readable
578 output.</para></listitem>
393a2f9b 579 </varlistentry>
5632e374
LP
580
581 <varlistentry>
74ac3cbd
MM
582 <term><command>reset-failed [NAME...]</command></term>
583
584 <listitem><para>Reset the
585 '<literal>failed</literal>' state of the
586 specified units, or if no unit name is
587 passed of all units. When a unit fails
588 in some way (i.e. process exiting with
589 non-zero error code, terminating
590 abnormally or timing out) it will
591 automatically enter the
592 '<literal>failed</literal>' state and
593 its exit code and status is recorded
594 for introspection by the administrator
5632e374
LP
595 until the service is restarted or
596 reset with this
597 command.</para></listitem>
598 </varlistentry>
599
ee5762e3
LP
600 <varlistentry>
601 <term><command>enable [NAME...]</command></term>
602
603 <listitem><para>Enable one or more
604 unit files, as specified on the
605 command line. This will create a
606 number of symlinks as encoded in the
607 <literal>[Install]</literal> sections
608 of the unit files. After the symlinks
609 have been created the systemd
610 configuration is reloaded (in a way
611 that is equivalent to
612 <command>daemon-reload</command>) to
613 ensure the changes are taken into
614 account immediately. Note that this
615 does not have the effect that any of
616 the units enabled are also started at
617 the same time. If this is desired a
96d4ce01 618 separate <command>start</command>
ee5762e3
LP
619 command must be invoked for the
620 unit.</para>
621
622 <para>This command will
623 print the actions executed. This
624 output may be suppressed by passing
625 <option>--quiet</option>.</para>
626
627 <para>Note that this operation creates
628 only the suggested symlinks for the
629 units. While this command is the
630 recommended way to manipulate the unit
631 configuration directory, the
632 administrator is free to make
633 additional changes manually, by
634 placing or removing symlinks in the
3d428115 635 directory. This is particularly useful
ee5762e3
LP
636 to create configurations that deviate
637 from the suggested default
638 installation. In this case the
639 administrator must make sure to invoke
640 <command>daemon-reload</command>
641 manually as necessary, to ensure his
642 changes are taken into account.</para>
643
644 <para>Enabling units should not be
645 confused with starting (activating)
646 units, as done by the
647 <command>start</command>
648 command. Enabling and starting units
649 is orthogonal: units may be enabled
650 without being started and started
651 without being enabled. Enabling simply
652 hooks the unit into various suggested
653 places (for example, so that the unit
654 is automatically started on boot or
655 when a particular kind of hardware is
656 plugged in). Starting actually spawns
657 the daemon process (in case of service
658 units), or binds the socket (in case
659 of socket units), and so
660 on.</para>
661
662 <para>Depending on whether
663 <option>--system</option>,
af2d49f7 664 <option>--user</option> or
ee5762e3
LP
665 <option>--global</option> is specified
666 this enables the unit for the system,
af2d49f7
LP
667 for the calling user only
668 or for all future logins of all
ee5762e3
LP
669 users. Note that in the latter case no
670 systemd daemon configuration is
671 reloaded.</para>
672 </listitem>
673 </varlistentry>
674
675 <varlistentry>
676 <term><command>disable [NAME...]</command></term>
677
678 <listitem><para>Disables one or more
679 units. This removes all symlinks to
680 the specified unit files from the unit
681 configuration directory, and hence
682 undoes the changes made by
683 <command>enable</command>. Note
684 however that this by default removes
685 all symlinks to the unit files
686 (i.e. including manual additions), not
687 just those actually created by
688 <command>enable</command>. If only the
689 symlinks that are suggested by default
690 shall be removed, pass
691 <option>--defaults</option>. This
692 implicitly reloads the systemd daemon
693 configuration after completing the
694 disabling of the units. Note that this
695 command does not implicitly stop the
696 units that is being disabled. If this
697 is desired an additional
698 <command>stop</command>command should
699 be executed afterwards.</para>
700
701 <para>This command will print the
702 actions executed. This output may be
703 suppressed by passing
704 <option>--quiet</option>.</para>
705 </listitem>
706
3d428115 707 <para>This command honors
ee5762e3 708 <option>--system</option>,
af2d49f7 709 <option>--user</option>,
ee5762e3
LP
710 <option>--global</option> in a similar
711 way as
712 <command>enable</command>.</para>
713 </varlistentry>
714
715 <varlistentry>
716 <term><command>is-enabled [NAME...]</command></term>
717
718 <listitem><para>Checks whether any of
719 the specified unit files is enabled
720 (as with
721 <command>enable</command>). Returns an
722 exit code of 0 if at least one is
723 enabled, non-zero
724 otherwise.</para></listitem>
725 </varlistentry>
726
393a2f9b
LP
727 <varlistentry>
728 <term><command>load [NAME...]</command></term>
729
730 <listitem><para>Load one or more units
731 specified on the command line. This
732 will simply load their configuration
733 from disk, but not start them. To
734 start them you need to use the
735 <command>start</command> command which
736 will implicitly load a unit that has
737 not been loaded yet. Note that systemd
738 garbage collects loaded units that are
739 not active or referenced by an active
740 unit. This means that units loaded
741 this way will usually not stay loaded
742 for long. Also note that this command
743 cannot be used to reload unit
744 configuration. Use the
745 <command>daemon-reload</command>
746 command for that. All in all, this
747 command is of little use except for
748 debugging.</para>
749 <para>This command should not be
750 confused with the
751 <command>daemon-reload</command> or
752 <command>reload</command>
753 commands.</para></listitem>
754 </varlistentry>
755 <varlistentry>
756 <term><command>list-jobs</command></term>
757
758 <listitem><para>List jobs that are in progress.</para></listitem>
759 </varlistentry>
760 <varlistentry>
761 <term><command>cancel [JOB...]</command></term>
762
763 <listitem><para>Cancel one or more
764 jobs specified on the command line by
765 their numeric job
3d428115 766 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
393a2f9b 767 </varlistentry>
7874bcd6
LP
768 <varlistentry>
769 <term><command>monitor</command></term>
770
771 <listitem><para>Monitor unit/job
772 changes. This is mostly useful for
773 debugging purposes and prints a line
774 each time systemd loads or unloads a
775 unit configuration file, or a unit
776 property changes.</para></listitem>
777 </varlistentry>
778 <varlistentry>
779 <term><command>dump</command></term>
780
781 <listitem><para>Dump server
782 status. This will output a (usually
783 very long) human readable manager
784 status dump. Its format is subject to
785 change without notice and should not
786 be parsed by
787 applications.</para></listitem>
788 </varlistentry>
4445a875
LP
789 <varlistentry>
790 <term><command>dot</command></term>
791
792 <listitem><para>Generate textual
793 dependency graph description in dot
794 format for further processing with the
795 GraphViz
796 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
797 tool. Use a command line like
798 <command>systemctl dot | dot -Tsvg >
799 systemd.svg</command> to generate a
800 graphical dependency tree. Unless
801 <option>--order</option> or
802 <option>--require</option> is passed
803 the generated graph will show both
804 ordering and requirement
805 dependencies.</para></listitem>
806 </varlistentry>
7874bcd6
LP
807 <varlistentry>
808 <term><command>snapshot [NAME]</command></term>
809
810 <listitem><para>Create a snapshot. If
af62c704 811 a snapshot name is specified, the new
7874bcd6
LP
812 snapshot will be named after it. If
813 none is specified an automatic
814 snapshot name is generated. In either
7594fb25
LP
815 case, the snapshot name used is
816 printed to STDOUT, unless
817 <option>--quiet</option> is
818 specified.</para>
7874bcd6
LP
819
820 <para>A snapshot refers to a saved
821 state of the systemd manager. It is
3d428115 822 implemented itself as a unit that is
7874bcd6
LP
823 generated dynamically with this
824 command and has dependencies on all
825 units active at the time. At a later
826 time the user may return to this state
827 by using the
828 <command>isolate</command> command on
829 the snapshot unit.</para></listitem>
830
831 <para>Snapshots are only useful for
832 saving and restoring which units are
833 running or are stopped, they do not
834 save/restore any other
835 state. Snapshots are dynamic and lost
836 on reboot.</para>
837 </varlistentry>
838 <varlistentry>
6759e7a7
LP
839 <term><command>delete [NAME...]</command></term>
840
841 <listitem><para>Remove a snapshot
842 previously created with
843 <command>snapshot</command>.</para></listitem>
844 </varlistentry>
845 <varlistentry>
7874bcd6
LP
846 <term><command>daemon-reload</command></term>
847
848 <listitem><para>Reload systemd manager
849 configuration. This will reload all
850 unit files and recreate the entire
851 dependency tree. While the daemon is
af62c704 852 reloaded, all sockets systemd listens
ad678a06 853 on on behalf of user configuration will
7874bcd6
LP
854 stay accessible.</para> <para>This
855 command should not be confused with
856 the <command>load</command> or
857 <command>reload</command>
858 commands.</para></listitem>
859 </varlistentry>
860 <varlistentry>
861 <term><command>daemon-reexec</command></term>
862
863 <listitem><para>Reexecute the systemd
864 manager. This will serialize the
865 manager state, reexecute the process
866 and deserialize the state again. This
867 command is of little use except for
868 debugging and package
869 upgrades. Sometimes it might be
870 helpful as a heavy-weight
871 <command>daemon-reload</command>. While
872 the daemon is reexecuted all sockets
873 systemd listens on on behalf of user
874 configuration will stay
875 accessible.</para></listitem>
876 </varlistentry>
7874bcd6
LP
877 <varlistentry>
878 <term><command>show-environment</command></term>
879
880 <listitem><para>Dump the systemd
881 manager environment block. The
882 environment block will be dumped in
883 straight-forward form suitable for
884 sourcing into a shell script. This
885 environment block will be passed to
886 all processes the manager
887 spawns.</para></listitem>
888 </varlistentry>
889 <varlistentry>
890 <term><command>set-environment [NAME=VALUE...]</command></term>
891
892 <listitem><para>Set one or more
893 systemd manager environment variables,
894 as specified on the command
895 line.</para></listitem>
896 </varlistentry>
897 <varlistentry>
898 <term><command>unset-environment [NAME...]</command></term>
899
900 <listitem><para>Unset one or more
901 systemd manager environment
902 variables. If only a variable name is
903 specified it will be removed
904 regardless of its value. If a variable
905 and a value are specified the variable
906 is only removed if it has the
907 specified value.</para></listitem>
908 </varlistentry>
59cddb23
LP
909 <varlistentry>
910 <term><command>default</command></term>
911
912 <listitem><para>Enter default
913 mode. This is mostly equivalent to
914 <command>start
915 default.target</command>.</para></listitem>
916 </varlistentry>
917 <varlistentry>
918 <term><command>rescue</command></term>
919
920 <listitem><para>Enter rescue
921 mode. This is mostly equivalent to
922 <command>isolate
923 rescue.target</command> but also
924 prints a wall message to all
925 users.</para></listitem>
926 </varlistentry>
927 <varlistentry>
928 <term><command>emergency</command></term>
7874bcd6 929
59cddb23
LP
930 <listitem><para>Enter emergency
931 mode. This is mostly equivalent to
932 <command>isolate
933 emergency.target</command> but also
934 prints a wall message to all
935 users.</para></listitem>
936 </varlistentry>
7874bcd6
LP
937 <varlistentry>
938 <term><command>halt</command></term>
939
940 <listitem><para>Shut down and halt the
941 system. This is mostly equivalent to
942 <command>start halt.target</command>
943 but also prints a wall message to all
59cddb23
LP
944 users. If
945 combined with <option>--force</option>
946 shutdown of all running services is
3d428115
RB
947 skipped, however all processes are killed
948 and all file systems are unmounted or
59cddb23
LP
949 mounted read-only, immediately
950 followed by the
951 system halt.</para></listitem>
7874bcd6
LP
952 </varlistentry>
953 <varlistentry>
954 <term><command>poweroff</command></term>
955
956 <listitem><para>Shut down and
957 power-off the system. This is mostly
958 equivalent to <command>start
959 poweroff.target</command> but also
960 prints a wall message to all
59cddb23
LP
961 users. If
962 combined with <option>--force</option>
963 shutdown of all running services is
3d428115
RB
964 skipped, however all processes are killed
965 and all file systems are unmounted or
59cddb23
LP
966 mounted read-only, immediately
967 followed by the
968 powering off.</para></listitem>
7874bcd6
LP
969 </varlistentry>
970 <varlistentry>
971 <term><command>reboot</command></term>
972
973 <listitem><para>Shut down and
974 reboot the system. This is mostly
975 equivalent to <command>start
976 reboot.target</command> but also
977 prints a wall message to all
59cddb23
LP
978 users. If
979 combined with <option>--force</option>
980 shutdown of all running services is
3d428115
RB
981 skipped, however all processes are killed
982 and all file systems are unmounted or
59cddb23
LP
983 mounted read-only, immediately
984 followed by the
985 reboot.</para></listitem>
7874bcd6
LP
986 </varlistentry>
987 <varlistentry>
59cddb23 988 <term><command>kexec</command></term>
7874bcd6 989
59cddb23
LP
990 <listitem><para>Shut down and reboot
991 the system via kexec. This is mostly
992 equivalent to <command>start
993 kexec.target</command> but also prints
994 a wall message to all users. If
995 combined with <option>--force</option>
996 shutdown of all running services is
3d428115
RB
997 skipped, however all processes are killed
998 and all file systems are unmounted or
59cddb23
LP
999 mounted read-only, immediately
1000 followed by the
1001 reboot.</para></listitem>
7874bcd6
LP
1002 </varlistentry>
1003 <varlistentry>
59cddb23 1004 <term><command>exit</command></term>
7874bcd6 1005
59cddb23
LP
1006 <listitem><para>Ask the systemd
1007 manager to quit. This is only
af2d49f7 1008 supported for user service managers
59cddb23 1009 (i.e. in conjunction with the
af2d49f7 1010 <option>--user</option> option) and
59cddb23 1011 will fail otherwise.</para></listitem>
7874bcd6
LP
1012 </varlistentry>
1013 </variablelist>
1014
1015 </refsect1>
1016
1017 <refsect1>
1018 <title>Exit status</title>
1019
1020 <para>On success 0 is returned, a non-zero failure
1021 code otherwise.</para>
1022 </refsect1>
1023
abebb5af
VS
1024 <refsect1>
1025 <title>Environment</title>
1026
1027 <variablelist>
1028 <varlistentry>
1029 <term><varname>$SYSTEMD_PAGER</varname></term>
1030 <listitem><para>Pager to use when
1031 <option>--no-pager</option> is not given;
1032 overrides <varname>$PAGER</varname>. Setting
1033 this to an empty string or the value
1034 <literal>cat</literal> is equivalent to passing
1035 <option>--no-pager</option>.</para></listitem>
1036 </varlistentry>
1037 </variablelist>
1038 </refsect1>
1039
7874bcd6
LP
1040 <refsect1>
1041 <title>See Also</title>
1042 <para>
1043 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1044 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1045 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1046 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1047 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1048 </para>
1049 </refsect1>
1050
1051</refentry>