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