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