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