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