chiark / gitweb /
move imported udev into place
[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                 <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>When listing units,
91                                 limit display to certain unit
92                                 types. If not specified units of all
93                                 types will be shown. The argument
94                                 should be a unit type name such as
95                                 <option>service</option>,
96                                 <option>socket</option> and
97                                 similar.</para></listitem>
98                         </varlistentry>
99
100                         <varlistentry>
101                                 <term><option>--property=</option></term>
102                                 <term><option>-p</option></term>
103
104                                 <listitem><para>When showing
105                                 unit/job/manager properties, limit
106                                 display to certain properties as
107                                 specified as argument. If not
108                                 specified all set properties are
109                                 shown. The argument should be a
110                                 property name, such as
111                                 <literal>MainPID</literal>. If
112                                 specified more than once all
113                                 properties with the specified names
114                                 are shown.</para></listitem>
115                         </varlistentry>
116
117                         <varlistentry>
118                                 <term><option>--all</option></term>
119                                 <term><option>-a</option></term>
120
121                                 <listitem><para>When listing units,
122                                 show all units, regardless of their
123                                 state, including inactive units. When
124                                 showing unit/job/manager properties,
125                                 show all properties regardless whether
126                                 they are set or not.</para></listitem>
127                         </varlistentry>
128
129                         <varlistentry>
130                                 <term><option>--failed</option></term>
131
132                                 <listitem><para>When listing units,
133                                 show only failed units. Do not confuse
134                                 with
135                                 <option>--fail</option>.</para></listitem>
136                         </varlistentry>
137
138                         <varlistentry>
139                                 <term><option>--full</option></term>
140
141                                 <listitem><para>Do not ellipsize unit
142                                 names and truncate unit descriptions
143                                 in the output of
144                                 <command>list-units</command> and
145                                 <command>list-jobs</command>.</para></listitem>
146                         </varlistentry>
147
148                         <varlistentry>
149                                 <term><option>--fail</option></term>
150
151                                 <listitem><para>If the requested
152                                 operation conflicts with a pending
153                                 unfinished job, fail the command. If
154                                 this is not specified the requested
155                                 operation will replace the pending job,
156                                 if necessary. Do not confuse
157                                 with
158                                 <option>--failed</option>.</para></listitem>
159                         </varlistentry>
160
161                         <varlistentry>
162                                 <term><option>--ignore-dependencies</option></term>
163
164                                 <listitem><para>When enqueuing a new
165                                 job ignore all its dependencies and
166                                 execute it immediately. If passed no
167                                 required units of the unit passed will
168                                 be pulled in, and no ordering
169                                 dependencies will be honoured. This is
170                                 mostly a debugging and rescue tool for
171                                 the administrator and should not be
172                                 used by
173                                 applications.</para></listitem>
174                         </varlistentry>
175
176                         <varlistentry>
177                                 <term><option>--quiet</option></term>
178                                 <term><option>-q</option></term>
179
180                                 <listitem><para>Suppress output to
181                                 STDOUT in
182                                 <command>snapshot</command>,
183                                 <command>is-active</command>,
184                                 <command>enable</command> and
185                                 <command>disable</command>.</para></listitem>
186                         </varlistentry>
187
188                         <varlistentry>
189                                 <term><option>--no-block</option></term>
190
191                                 <listitem><para>Do not synchronously wait for
192                                 the requested operation to finish. If this is
193                                 not specified the job will be verified,
194                                 enqueued and <command>systemctl</command> will
195                                 wait until it is completed. By passing this
196                                 argument it is only verified and
197                                 enqueued.</para></listitem>
198                         </varlistentry>
199
200                         <varlistentry>
201                                 <term><option>--no-legend</option></term>
202
203                                 <listitem><para>Do not print a legend, i.e.
204                                 the column headers and the footer with hints.
205                                 </para></listitem>
206                         </varlistentry>
207
208                         <varlistentry>
209                                 <term><option>--no-pager</option></term>
210
211                                 <listitem><para>Do not pipe output into a
212                                 pager.</para></listitem>
213                         </varlistentry>
214
215                         <varlistentry>
216                                 <term><option>--system</option></term>
217
218                                 <listitem><para>Talk to the systemd
219                                 system manager. (Default)</para></listitem>
220                         </varlistentry>
221
222                         <varlistentry>
223                                 <term><option>--user</option></term>
224
225                                 <listitem><para>Talk to the systemd
226                                 manager of the calling user.</para></listitem>
227                         </varlistentry>
228
229                         <varlistentry>
230                                 <term><option>--order</option></term>
231                                 <term><option>--require</option></term>
232
233                                 <listitem><para>When used in
234                                 conjunction with the
235                                 <command>dot</command> command (see
236                                 below), selects which dependencies are
237                                 shown in the dependency graph. If
238                                 <option>--order</option> is passed
239                                 only dependencies of type
240                                 <varname>After=</varname> or
241                                 <varname>Before=</varname> are
242                                 shown. If <option>--require</option>
243                                 is passed only dependencies of type
244                                 <varname>Requires=</varname>,
245                                 <varname>RequiresOverridable=</varname>,
246                                 <varname>Requisite=</varname>,
247                                 <varname>RequisiteOverridable=</varname>,
248                                 <varname>Wants=</varname> and
249                                 <varname>Conflicts=</varname> are
250                                 shown. If neither is passed, shows
251                                 dependencies of all these
252                                 types.</para></listitem>
253                         </varlistentry>
254
255                         <varlistentry>
256                                 <term><option>--no-wall</option></term>
257
258                                 <listitem><para>Don't send wall
259                                 message before
260                                 halt, power-off, reboot.</para></listitem>
261                         </varlistentry>
262
263                         <varlistentry>
264                                 <term><option>--global</option></term>
265
266                                 <listitem><para>When used with
267                                 <command>enable</command> and
268                                 <command>disable</command>, operate on the
269                                 global user configuration
270                                 directory, thus enabling or disabling
271                                 a unit file globally for all future
272                                 logins of all users.</para></listitem>
273                         </varlistentry>
274
275                         <varlistentry>
276                                 <term><option>--no-reload</option></term>
277
278                                 <listitem><para>When used with
279                                 <command>enable</command> and
280                                 <command>disable</command>, do not
281                                 implicitly reload daemon configuration
282                                 after executing the
283                                 changes.</para></listitem>
284                         </varlistentry>
285
286                         <varlistentry>
287                                 <term><option>--no-ask-password</option></term>
288
289                                 <listitem><para>When used with
290                                 <command>start</command> and related
291                                 commands, disables asking for
292                                 passwords. Background services may
293                                 require input of a password or
294                                 passphrase string, for example to
295                                 unlock system hard disks or
296                                 cryptographic certificates. Unless
297                                 this option is specified and the
298                                 command is invoked from a terminal
299                                 <command>systemctl</command> will
300                                 query the user on the terminal for the
301                                 necessary secrets. Use this option to
302                                 switch this behavior off. In this
303                                 case the password must be supplied by
304                                 some other means (for example
305                                 graphical password agents) or the
306                                 service might fail.</para></listitem>
307                         </varlistentry>
308
309                         <varlistentry>
310                                 <term><option>--kill-who=</option></term>
311
312                                 <listitem><para>When used with
313                                 <command>kill</command>, choose which
314                                 processes to kill. Must be one of
315                                 <option>main</option>,
316                                 <option>control</option> or
317                                 <option>all</option> to select whether
318                                 to kill only the main process of the
319                                 unit, the control process or all
320                                 processes of the unit. If omitted
321                                 defaults to
322                                 <option>all</option>.</para></listitem>
323                         </varlistentry>
324
325                         <varlistentry>
326                                 <term><option>--signal=</option></term>
327                                 <term><option>-s</option></term>
328
329                                 <listitem><para>When used with
330                                 <command>kill</command>, choose which
331                                 signal to send to selected
332                                 processes. Must be one of the well
333                                 known signal specifiers such as
334                                 SIGTERM, SIGINT or SIGSTOP. If
335                                 omitted defaults to
336                                 <option>SIGTERM</option>.</para></listitem>
337                         </varlistentry>
338
339                         <varlistentry>
340                                 <term><option>--force</option></term>
341                                 <term><option>-f</option></term>
342
343                                 <listitem><para>When used with
344                                 <command>enable</command>, override any
345                                 existing conflicting
346                                 symlinks.</para></listitem>
347
348                                 <listitem><para>When used with
349                                 <command>halt</command>,
350                                 <command>poweroff</command>,
351                                 <command>reboot</command> or
352                                 <command>kexec</command> execute the
353                                 selected operation without shutting
354                                 down all units. However, all processes
355                                 will be killed forcibly and all file
356                                 systems are unmounted or remounted
357                                 read-only. This is hence a drastic but
358                                 relatively safe option to request an
359                                 immediate reboot. If
360                                 <option>--force</option> is specified
361                                 twice for these operations, they will
362                                 be executed immediately without
363                                 terminating any processes or umounting
364                                 any file systems. Warning: specifying
365                                 <option>--force</option> twice with
366                                 any of these operations might result
367                                 in data loss.</para></listitem>
368                         </varlistentry>
369
370                         <varlistentry>
371                                 <term><option>--root=</option></term>
372
373                                 <listitem><para>When used with
374                                 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
375                                 related commands), use alternative
376                                 root path when looking for unit
377                                 files.</para></listitem>
378                         </varlistentry>
379
380                         <varlistentry>
381                                 <term><option>--runtime</option></term>
382
383                                 <listitem><para>When used with
384                                 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
385                                 changes only temporarily, so that they
386                                 are dropped on the next reboot. This
387                                 will have the effect that changes are
388                                 not made in subdirectories of
389                                 <filename>/etc</filename> but in
390                                 <filename>/run</filename>, with
391                                 identical immediate effects, however,
392                                 since the latter is lost on reboot,
393                                 the changes are lost
394                                 too.</para></listitem>
395                         </varlistentry>
396
397                         <varlistentry>
398                                 <term><option>-H</option></term>
399                                 <term><option>--host</option></term>
400
401                                 <listitem><para>Execute operation
402                                 remotely. Specify a hostname, or
403                                 username and hostname separated by @,
404                                 to connect to. This will use SSH to
405                                 talk to the remote systemd
406                                 instance.</para></listitem>
407                         </varlistentry>
408
409                         <varlistentry>
410                                 <term><option>-P</option></term>
411                                 <term><option>--privileged</option></term>
412
413                                 <listitem><para>Acquire privileges via
414                                 PolicyKit before executing the
415                                 operation.</para></listitem>
416                         </varlistentry>
417
418                         <varlistentry>
419                                 <term><option>--lines=</option></term>
420                                 <term><option>-n</option></term>
421
422                                 <listitem><para>When used with
423                                 <command>status</command> controls the
424                                 number of journal lines to show,
425                                 counting from the most recent
426                                 ones. Takes a positive integer
427                                 argument. Defaults to
428                                 10.</para></listitem>
429                         </varlistentry>
430
431                         <varlistentry>
432                                 <term><option>--follow</option></term>
433                                 <term><option>-f</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>