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