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