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