chiark / gitweb /
man: document sd_journal_seek_head()
[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 honoured. 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>--follow</option></term>
447                                 <term><option>-f</option></term>
448
449                                 <listitem><para>When used with
450                                 <command>status</command> continously
451                                 prints new journal entries as they are
452                                 appended to the
453                                 journal.</para></listitem>
454                         </varlistentry>
455
456                         <varlistentry>
457                                 <term><option>--output=</option></term>
458                                 <term><option>-o</option></term>
459
460                                 <listitem><para>When used with
461                                 <command>status</command> controls the
462                                 formatting of the journal entries that
463                                 are shown. For the available choices
464                                 see
465                                 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
466                                 to
467                                 <literal>short</literal>.</para></listitem>
468                         </varlistentry>
469
470                 </variablelist>
471
472                 <para>The following commands are understood:</para>
473
474                 <variablelist>
475                         <varlistentry>
476                                 <term><command>list-units</command></term>
477
478                                 <listitem><para>List known units.</para></listitem>
479                         </varlistentry>
480                         <varlistentry>
481                                 <term><command>start [NAME...]</command></term>
482
483                                 <listitem><para>Start (activate) one
484                                 or more units specified on the command
485                                 line.</para></listitem>
486                         </varlistentry>
487                         <varlistentry>
488                                 <term><command>stop [NAME...]</command></term>
489
490                                 <listitem><para>Stop (deactivate) one
491                                 or more units specified on the command
492                                 line.</para></listitem>
493                         </varlistentry>
494                         <varlistentry>
495                                 <term><command>reload [NAME...]</command></term>
496
497                                 <listitem><para>Asks all units listed
498                                 on the command line to reload their
499                                 configuration. Note that this will
500                                 reload the service-specific
501                                 configuration, not the unit
502                                 configuration file of systemd. If you
503                                 want systemd to reload the
504                                 configuration file of a unit use the
505                                 <command>daemon-reload</command>
506                                 command. In other words: for the
507                                 example case of Apache, this will
508                                 reload Apache's
509                                 <filename>httpd.conf</filename> in the
510                                 web server, not the
511                                 <filename>apache.service</filename>
512                                 systemd unit file. </para>
513
514                                 <para>This command should not be
515                                 confused with the
516                                 <command>daemon-reload</command> or
517                                 <command>load</command>
518                                 commands.</para></listitem>
519
520                         </varlistentry>
521                         <varlistentry>
522                                 <term><command>restart [NAME...]</command></term>
523
524                                 <listitem><para>Restart one or more
525                                 units specified on the command
526                                 line. If the units are not running yet
527                                 they will be
528                                 started.</para></listitem>
529                         </varlistentry>
530                         <varlistentry>
531                                 <term><command>try-restart [NAME...]</command></term>
532
533                                 <listitem><para>Restart one or more
534                                 units specified on the command
535                                 line if the units are running. Do
536                                 nothing if units are not running.
537                                 Note that for compatibility
538                                 with Red Hat init scripts
539                                 <command>condrestart</command> is
540                                 equivalent to this command.</para></listitem>
541                         </varlistentry>
542                         <varlistentry>
543                                 <term><command>reload-or-restart [NAME...]</command></term>
544
545                                 <listitem><para>Reload one or more
546                                 units if they support it. If not,
547                                 restart them instead. If the units
548                                 are not running yet they will be
549                                 started.</para></listitem>
550                         </varlistentry>
551                         <varlistentry>
552                                 <term><command>reload-or-try-restart [NAME...]</command></term>
553
554                                 <listitem><para>Reload one or more
555                                 units if they support it. If not,
556                                 restart them instead. Do nothing if
557                                 the units are not running. Note that
558                                 for compatibility with SysV init
559                                 scripts
560                                 <command>force-reload</command> is
561                                 equivalent to this
562                                 command.</para></listitem>
563                         </varlistentry>
564                         <varlistentry>
565                                 <term><command>isolate [NAME]</command></term>
566
567                                 <listitem><para>Start the unit
568                                 specified on the command line and its
569                                 dependencies and stop all others.</para>
570
571                                 <para>This is similar to changing the
572                                 runlevel in a traditional init system. The
573                                 <command>isolate</command> command will
574                                 immediately stop processes that are not
575                                 enabled in the new unit, possibly including
576                                 the graphical environment or terminal you
577                                 are currently using.</para>
578
579                                 <para>Note that this works only on units
580                                 where <option>AllowIsolate=</option> is
581                                 enabled. See
582                                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
583                                 for details.</para></listitem>
584                         </varlistentry>
585                         <varlistentry>
586                                 <term><command>kill [NAME...]</command></term>
587
588                                 <listitem><para>Send a signal to one
589                                 or more processes of the unit. Use
590                                 <option>--kill-who=</option> to select
591                                 which process to kill. Use
592                                 <option>--kill-mode=</option> to
593                                 select the kill mode and
594                                 <option>--signal=</option> to select
595                                 the signal to send.</para></listitem>
596                         </varlistentry>
597                         <varlistentry>
598                                 <term><command>is-active [NAME...]</command></term>
599
600                                 <listitem><para>Check whether any of
601                                 the specified units are active
602                                 (i.e. running). Returns an exit code
603                                 0 if at least one is active, non-zero
604                                 otherwise. Unless
605                                 <option>--quiet</option> is specified
606                                 this will also print the current unit
607                                 state to STDOUT.</para></listitem>
608                         </varlistentry>
609                         <varlistentry>
610                                 <term><command>status [NAME...|PID...]</command></term>
611
612                                 <listitem><para>Show terse runtime
613                                 status information about one or more
614                                 units, followed by its most recent log
615                                 data from the journal. This function
616                                 is intended to generate human-readable
617                                 output. If you are looking for
618                                 computer-parsable output, use
619                                 <command>show</command> instead. If a
620                                 PID is passed information about the
621                                 unit the process of the PID belongs to
622                                 is shown.</para></listitem>
623                         </varlistentry>
624                         <varlistentry>
625                                 <term><command>show [NAME...|JOB...]</command></term>
626
627                                 <listitem><para>Show properties of one
628                                 or more units, jobs or the manager
629                                 itself. If no argument is specified
630                                 properties of the manager will be
631                                 shown. If a unit name is specified
632                                 properties of the unit is shown, and
633                                 if a job id is specified properties of
634                                 the job is shown. By default, empty
635                                 properties are suppressed. Use
636                                 <option>--all</option> to show those
637                                 too. To select specific properties to
638                                 show use
639                                 <option>--property=</option>. This
640                                 command is intended to be used
641                                 whenever computer-parsable output is
642                                 required. Use
643                                 <command>status</command> if you are
644                                 looking for formatted human-readable
645                                 output.</para></listitem>
646                         </varlistentry>
647                         <varlistentry>
648                                 <term><command>help [NAME...|PID...]</command></term>
649
650                                 <listitem><para>Show manual pages for
651                                 one or more units, if available. If a
652                                 PID is passed the manual pages for the
653                                 unit the process of the PID belongs to
654                                 is shown.</para></listitem>
655                         </varlistentry>
656                         <varlistentry>
657                                 <term><command>reset-failed [NAME...]</command></term>
658
659                                 <listitem><para>Reset the
660                                 '<literal>failed</literal>' state of the
661                                 specified units, or if no unit name is
662                                 passed of all units. When a unit fails
663                                 in some way (i.e. process exiting with
664                                 non-zero error code, terminating
665                                 abnormally or timing out) it will
666                                 automatically enter the
667                                 '<literal>failed</literal>' state and
668                                 its exit code and status is recorded
669                                 for introspection by the administrator
670                                 until the service is restarted or
671                                 reset with this
672                                 command.</para></listitem>
673                         </varlistentry>
674
675                         <varlistentry>
676                                 <term><command>list-unit-files</command></term>
677
678                                 <listitem><para>List installed unit files.
679                                 </para></listitem>
680                         </varlistentry>
681
682                         <varlistentry>
683                                 <term><command>enable [NAME...]</command></term>
684
685                                 <listitem><para>Enable one or more
686                                 unit files, as specified on the
687                                 command line. This will create a
688                                 number of symlinks as encoded in the
689                                 <literal>[Install]</literal> sections
690                                 of the unit files. After the symlinks
691                                 have been created the systemd
692                                 configuration is reloaded (in a way
693                                 that is equivalent to
694                                 <command>daemon-reload</command>) to
695                                 ensure the changes are taken into
696                                 account immediately. Note that this
697                                 does not have the effect that any of
698                                 the units enabled are also started at
699                                 the same time. If this is desired a
700                                 separate <command>start</command>
701                                 command must be invoked for the
702                                 unit.</para>
703
704                                 <para>This command will
705                                 print the actions executed. This
706                                 output may be suppressed by passing
707                                 <option>--quiet</option>.</para>
708
709                                 <para>Note that this operation creates
710                                 only the suggested symlinks for the
711                                 units. While this command is the
712                                 recommended way to manipulate the unit
713                                 configuration directory, the
714                                 administrator is free to make
715                                 additional changes manually, by
716                                 placing or removing symlinks in the
717                                 directory. This is particularly useful
718                                 to create configurations that deviate
719                                 from the suggested default
720                                 installation. In this case the
721                                 administrator must make sure to invoke
722                                 <command>daemon-reload</command>
723                                 manually as necessary, to ensure his
724                                 changes are taken into account.</para>
725
726                                 <para>Enabling units should not be
727                                 confused with starting (activating)
728                                 units, as done by the
729                                 <command>start</command>
730                                 command. Enabling and starting units
731                                 is orthogonal: units may be enabled
732                                 without being started and started
733                                 without being enabled. Enabling simply
734                                 hooks the unit into various suggested
735                                 places (for example, so that the unit
736                                 is automatically started on boot or
737                                 when a particular kind of hardware is
738                                 plugged in). Starting actually spawns
739                                 the daemon process (in case of service
740                                 units), or binds the socket (in case
741                                 of socket units), and so
742                                 on.</para>
743
744                                 <para>Depending on whether
745                                 <option>--system</option>,
746                                 <option>--user</option> or
747                                 <option>--global</option> is specified
748                                 this enables the unit for the system,
749                                 for the calling user only
750                                 or for all future logins of all
751                                 users. Note that in the latter case no
752                                 systemd daemon configuration is
753                                 reloaded.</para>
754                                 </listitem>
755                         </varlistentry>
756
757                         <varlistentry>
758                                 <term><command>disable [NAME...]</command></term>
759
760                                 <listitem><para>Disables one or more
761                                 units. This removes all symlinks to
762                                 the specified unit files from the unit
763                                 configuration directory, and hence
764                                 undoes the changes made by
765                                 <command>enable</command>. Note
766                                 however that this removes
767                                 all symlinks to the unit files
768                                 (i.e. including manual additions), not
769                                 just those actually created by
770                                 <command>enable</command>. This call
771                                 implicitly reloads the systemd daemon
772                                 configuration after completing the
773                                 disabling of the units. Note that this
774                                 command does not implicitly stop the
775                                 units that is being disabled. If this
776                                 is desired an additional
777                                 <command>stop</command> command should
778                                 be executed afterwards.</para>
779
780                                 <para>This command will print the
781                                 actions executed. This output may be
782                                 suppressed by passing
783                                 <option>--quiet</option>.</para>
784                                 </listitem>
785
786                                 <para>This command honors
787                                 <option>--system</option>,
788                                 <option>--user</option>,
789                                 <option>--global</option> in a similar
790                                 way as
791                                 <command>enable</command>.</para>
792                         </varlistentry>
793
794                         <varlistentry>
795                                 <term><command>is-enabled [NAME...]</command></term>
796
797                                 <listitem><para>Checks whether any of
798                                 the specified unit files is enabled
799                                 (as with
800                                 <command>enable</command>). Returns an
801                                 exit code of 0 if at least one is
802                                 enabled, non-zero otherwise. Prints
803                                 the current enable status. To suppress
804                                 this output use
805                                 <option>--quiet</option>.</para></listitem>
806                         </varlistentry>
807
808                         <varlistentry>
809                                 <term><command>reenable [NAME...]</command></term>
810
811                                 <listitem><para>Reenable one or more
812                                 unit files, as specified on the
813                                 command line. This is a combination of
814                                 <command>disable</command> and
815                                 <command>enable</command> and is
816                                 useful to reset the symlinks a unit is
817                                 enabled with to the defaults
818                                 configured in the
819                                 <literal>[Install]</literal> section
820                                 of the unit file.</para>
821                                 </listitem>
822                         </varlistentry>
823
824                         <varlistentry>
825                                 <term><command>preset [NAME...]</command></term>
826
827                                 <listitem><para>Reset one or more unit
828                                 files, as specified on the command
829                                 line, to the defaults configured in
830                                 the preset policy files. This has the
831                                 same effect as
832                                 <command>disable</command> or
833                                 <command>enable</command>, depending
834                                 how the unit is listed in the preset
835                                 files. For more information on preset
836                                 policy format see
837                                 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
838                                 more information on the concept of
839                                 presets please consult the <ulink
840                                 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
841                                 document.</para>
842                                 </listitem>
843                         </varlistentry>
844
845                         <varlistentry>
846                                 <term><command>mask [NAME...]</command></term>
847
848                                 <listitem><para>Mask one or more unit
849                                 files, as specified on the command
850                                 line. This will link these units to
851                                 <filename>/dev/null</filename>, making
852                                 it impossible to start them. This is a stronger version
853                                 of <command>disable</command>, since
854                                 it prohibits all kinds of activation
855                                 of the unit, including manual
856                                 activation. Use this option with
857                                 care.</para>
858                                 </listitem>
859                         </varlistentry>
860
861                         <varlistentry>
862                                 <term><command>unmask [NAME...]</command></term>
863
864                                 <listitem><para>Unmask one or more
865                                 unit files, as specified on the
866                                 command line. This will undo the
867                                 effect of
868                                 <command>mask</command>.</para>
869                                 </listitem>
870                         </varlistentry>
871
872                         <varlistentry>
873                                 <term><command>link [NAME...]</command></term>
874
875                                 <listitem><para>Link a unit file that
876                                 is not in the unit file search paths
877                                 into the unit file search path. This
878                                 requires an absolute path to a unit
879                                 file. The effect of this can be undone
880                                 with <command>disable</command>. The
881                                 effect of this command is that a unit
882                                 file is available for
883                                 <command>start</command> and other
884                                 commands although it isn't installed
885                                 directly in the unit search
886                                 path.</para>
887                                 </listitem>
888                         </varlistentry>
889
890                         <varlistentry>
891                                 <term><command>load [NAME...]</command></term>
892
893                                 <listitem><para>Load one or more units
894                                 specified on the command line. This
895                                 will simply load their configuration
896                                 from disk, but not start them. To
897                                 start them you need to use the
898                                 <command>start</command> command which
899                                 will implicitly load a unit that has
900                                 not been loaded yet. Note that systemd
901                                 garbage collects loaded units that are
902                                 not active or referenced by an active
903                                 unit. This means that units loaded
904                                 this way will usually not stay loaded
905                                 for long. Also note that this command
906                                 cannot be used to reload unit
907                                 configuration. Use the
908                                 <command>daemon-reload</command>
909                                 command for that. All in all, this
910                                 command is of little use except for
911                                 debugging.</para>
912                                 <para>This command should not be
913                                 confused with the
914                                 <command>daemon-reload</command> or
915                                 <command>reload</command>
916                                 commands.</para></listitem>
917                         </varlistentry>
918                         <varlistentry>
919                                 <term><command>list-jobs</command></term>
920
921                                 <listitem><para>List jobs that are in progress.</para></listitem>
922                         </varlistentry>
923                         <varlistentry>
924                                 <term><command>cancel [JOB...]</command></term>
925
926                                 <listitem><para>Cancel one or more
927                                 jobs specified on the command line by
928                                 their numeric job
929                                 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
930                         </varlistentry>
931                         <varlistentry>
932                                 <term><command>dump</command></term>
933
934                                 <listitem><para>Dump server
935                                 status. This will output a (usually
936                                 very long) human readable manager
937                                 status dump. Its format is subject to
938                                 change without notice and should not
939                                 be parsed by
940                                 applications.</para></listitem>
941                         </varlistentry>
942                         <varlistentry>
943                                 <term><command>dot</command></term>
944
945                                 <listitem><para>Generate textual
946                                 dependency graph description in dot
947                                 format for further processing with the
948                                 GraphViz
949                                 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
950                                 tool. Use a command line like
951                                 <command>systemctl dot | dot -Tsvg >
952                                 systemd.svg</command> to generate a
953                                 graphical dependency tree. Unless
954                                 <option>--order</option> or
955                                 <option>--require</option> is passed
956                                 the generated graph will show both
957                                 ordering and requirement
958                                 dependencies.</para></listitem>
959                         </varlistentry>
960                         <varlistentry>
961                                 <term><command>snapshot [NAME]</command></term>
962
963                                 <listitem><para>Create a snapshot. If
964                                 a snapshot name is specified, the new
965                                 snapshot will be named after it. If
966                                 none is specified an automatic
967                                 snapshot name is generated. In either
968                                 case, the snapshot name used is
969                                 printed to STDOUT, unless
970                                 <option>--quiet</option> is
971                                 specified.</para>
972
973                                 <para>A snapshot refers to a saved
974                                 state of the systemd manager. It is
975                                 implemented itself as a unit that is
976                                 generated dynamically with this
977                                 command and has dependencies on all
978                                 units active at the time. At a later
979                                 time the user may return to this state
980                                 by using the
981                                 <command>isolate</command> command on
982                                 the snapshot unit.</para></listitem>
983
984                                 <para>Snapshots are only useful for
985                                 saving and restoring which units are
986                                 running or are stopped, they do not
987                                 save/restore any other
988                                 state. Snapshots are dynamic and lost
989                                 on reboot.</para>
990                         </varlistentry>
991                         <varlistentry>
992                                 <term><command>delete [NAME...]</command></term>
993
994                                 <listitem><para>Remove a snapshot
995                                 previously created with
996                                 <command>snapshot</command>.</para></listitem>
997                         </varlistentry>
998                         <varlistentry>
999                                 <term><command>daemon-reload</command></term>
1000
1001                                 <listitem><para>Reload systemd manager
1002                                 configuration. This will reload all
1003                                 unit files and recreate the entire
1004                                 dependency tree. While the daemon is
1005                                 reloaded, all sockets systemd listens
1006                                 on on behalf of user configuration will
1007                                 stay accessible.</para> <para>This
1008                                 command should not be confused with
1009                                 the <command>load</command> or
1010                                 <command>reload</command>
1011                                 commands.</para></listitem>
1012                         </varlistentry>
1013                         <varlistentry>
1014                                 <term><command>daemon-reexec</command></term>
1015
1016                                 <listitem><para>Reexecute the systemd
1017                                 manager. This will serialize the
1018                                 manager state, reexecute the process
1019                                 and deserialize the state again. This
1020                                 command is of little use except for
1021                                 debugging and package
1022                                 upgrades. Sometimes it might be
1023                                 helpful as a heavy-weight
1024                                 <command>daemon-reload</command>. While
1025                                 the daemon is reexecuted all sockets
1026                                 systemd listens on on behalf of user
1027                                 configuration will stay
1028                                 accessible.</para></listitem>
1029                         </varlistentry>
1030                         <varlistentry>
1031                                 <term><command>show-environment</command></term>
1032
1033                                 <listitem><para>Dump the systemd
1034                                 manager environment block. The
1035                                 environment block will be dumped in
1036                                 straight-forward form suitable for
1037                                 sourcing into a shell script. This
1038                                 environment block will be passed to
1039                                 all processes the manager
1040                                 spawns.</para></listitem>
1041                         </varlistentry>
1042                         <varlistentry>
1043                                 <term><command>set-environment [NAME=VALUE...]</command></term>
1044
1045                                 <listitem><para>Set one or more
1046                                 systemd manager environment variables,
1047                                 as specified on the command
1048                                 line.</para></listitem>
1049                         </varlistentry>
1050                         <varlistentry>
1051                                 <term><command>unset-environment [NAME...]</command></term>
1052
1053                                 <listitem><para>Unset one or more
1054                                 systemd manager environment
1055                                 variables. If only a variable name is
1056                                 specified it will be removed
1057                                 regardless of its value. If a variable
1058                                 and a value are specified the variable
1059                                 is only removed if it has the
1060                                 specified value.</para></listitem>
1061                         </varlistentry>
1062                         <varlistentry>
1063                                 <term><command>default</command></term>
1064
1065                                 <listitem><para>Enter default
1066                                 mode. This is mostly equivalent to
1067                                 <command>start
1068                                 default.target</command>.</para></listitem>
1069                         </varlistentry>
1070                         <varlistentry>
1071                                 <term><command>rescue</command></term>
1072
1073                                 <listitem><para>Enter rescue
1074                                 mode. This is mostly equivalent to
1075                                 <command>isolate
1076                                 rescue.target</command> but also
1077                                 prints a wall message to all
1078                                 users.</para></listitem>
1079                         </varlistentry>
1080                         <varlistentry>
1081                                 <term><command>emergency</command></term>
1082
1083                                 <listitem><para>Enter emergency
1084                                 mode. This is mostly equivalent to
1085                                 <command>isolate
1086                                 emergency.target</command> but also
1087                                 prints a wall message to all
1088                                 users.</para></listitem>
1089                         </varlistentry>
1090                         <varlistentry>
1091                                 <term><command>halt</command></term>
1092
1093                                 <listitem><para>Shut down and halt the
1094                                 system. This is mostly equivalent to
1095                                 <command>start halt.target</command>
1096                                 but also prints a wall message to all
1097                                 users.  If combined with
1098                                 <option>--force</option> shutdown of
1099                                 all running services is skipped,
1100                                 however all processes are killed and
1101                                 all file systems are unmounted or
1102                                 mounted read-only, immediately
1103                                 followed by the system halt.  If
1104                                 <option>--force</option> is specified
1105                                 twice the the operation is immediately
1106                                 executed without terminating any
1107                                 processes or unmounting any file
1108                                 systems. This may result in data
1109                                 loss.</para></listitem>
1110                         </varlistentry>
1111                         <varlistentry>
1112                                 <term><command>poweroff</command></term>
1113
1114                                 <listitem><para>Shut down and
1115                                 power-off the system. This is mostly
1116                                 equivalent to <command>start
1117                                 poweroff.target</command> but also
1118                                 prints a wall message to all users. If
1119                                 combined with <option>--force</option>
1120                                 shutdown of all running services is
1121                                 skipped, however all processes are
1122                                 killed and all file systems are
1123                                 unmounted or mounted read-only,
1124                                 immediately followed by the powering
1125                                 off. If <option>--force</option> is
1126                                 specified twice the the operation is
1127                                 immediately executed without
1128                                 terminating any processes or
1129                                 unmounting any file systems. This may
1130                                 result in data loss.</para></listitem>
1131                         </varlistentry>
1132                         <varlistentry>
1133                                 <term><command>reboot</command></term>
1134
1135                                 <listitem><para>Shut down and reboot
1136                                 the system. This is mostly equivalent
1137                                 to <command>start
1138                                 reboot.target</command> but also
1139                                 prints a wall message to all users. If
1140                                 combined with <option>--force</option>
1141                                 shutdown of all running services is
1142                                 skipped, however all processes are
1143                                 killed and all file systems are
1144                                 unmounted or mounted read-only,
1145                                 immediately followed by the reboot. If
1146                                 <option>--force</option> is specified
1147                                 twice the the operation is immediately
1148                                 executed without terminating any
1149                                 processes or unmounting any file
1150                                 systems. This may result in data
1151                                 loss.</para></listitem>
1152                         </varlistentry>
1153                         <varlistentry>
1154                                 <term><command>kexec</command></term>
1155
1156                                 <listitem><para>Shut down and reboot
1157                                 the system via kexec. This is mostly
1158                                 equivalent to <command>start
1159                                 kexec.target</command> but also prints
1160                                 a wall message to all users. If
1161                                 combined with <option>--force</option>
1162                                 shutdown of all running services is
1163                                 skipped, however all processes are killed
1164                                 and all file systems are unmounted or
1165                                 mounted read-only, immediately
1166                                 followed by the
1167                                 reboot.</para></listitem>
1168                         </varlistentry>
1169                         <varlistentry>
1170                                 <term><command>exit</command></term>
1171
1172                                 <listitem><para>Ask the systemd
1173                                 manager to quit. This is only
1174                                 supported for user service managers
1175                                 (i.e. in conjunction with the
1176                                 <option>--user</option> option) and
1177                                 will fail otherwise.</para></listitem>
1178                         </varlistentry>
1179                         <varlistentry>
1180                                 <term><command>suspend</command></term>
1181
1182                                 <listitem><para>Suspend the system.</para></listitem>
1183                         </varlistentry>
1184                         <varlistentry>
1185                                 <term><command>hibernate</command></term>
1186
1187                                 <listitem><para>Hibernate the system.</para></listitem>
1188                         </varlistentry>
1189                         <varlistentry>
1190                                 <term><command>switch-root [ROOT] [INIT]</command></term>
1191
1192                                 <listitem><para>Switches to a
1193                                 different root directory and executes
1194                                 a new system manager process below
1195                                 it. This is intended for usage in
1196                                 initial RAM disks ("initrd"), and will
1197                                 transition from the initrd's system
1198                                 manager process (a.k.a "init" process)
1199                                 to the main system manager
1200                                 process. Takes two arguments: the
1201                                 directory to make the new root
1202                                 directory, and the path to the new
1203                                 system manager binary below it to
1204                                 execute as PID 1. If the latter is
1205                                 ommitted or the empty string, a
1206                                 systemd binary will automatically be
1207                                 searched for and used as init. If the
1208                                 system manager path is ommitted or
1209                                 equal the empty string the state of
1210                                 the initrd's system manager process is
1211                                 passed to the main system manager,
1212                                 which allows later introspection of the
1213                                 state of the services involved in the
1214                                 initrd boot.</para></listitem>
1215                         </varlistentry>
1216                 </variablelist>
1217
1218         </refsect1>
1219
1220         <refsect1>
1221                 <title>Exit status</title>
1222
1223                 <para>On success 0 is returned, a non-zero failure
1224                 code otherwise.</para>
1225         </refsect1>
1226
1227         <refsect1>
1228                 <title>Environment</title>
1229
1230                 <variablelist>
1231                         <varlistentry>
1232                                 <term><varname>$SYSTEMD_PAGER</varname></term>
1233                                 <listitem><para>Pager to use when
1234                                 <option>--no-pager</option> is not given;
1235                                 overrides <varname>$PAGER</varname>.  Setting
1236                                 this to an empty string or the value
1237                                 <literal>cat</literal> is equivalent to passing
1238                                 <option>--no-pager</option>.</para></listitem>
1239                         </varlistentry>
1240                 </variablelist>
1241         </refsect1>
1242
1243         <refsect1>
1244                 <title>See Also</title>
1245                 <para>
1246                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1247                         <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1248                         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1249                         <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1250                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1251                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1252                         <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1253                         <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1254                 </para>
1255         </refsect1>
1256
1257 </refentry>