chiark / gitweb /
headers: fix git URLs for source files
[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
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.</para></listitem>
360                         </varlistentry>
361
362                         <varlistentry>
363                                 <term><option>--root=</option></term>
364
365                                 <listitem><para>When used with
366                                 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
367                                 related commands), use alternative
368                                 root path when looking for unit
369                                 files.</para></listitem>
370                         </varlistentry>
371
372                         <varlistentry>
373                                 <term><option>--runtime</option></term>
374
375                                 <listitem><para>When used with
376                                 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
377                                 changes only temporarily, so that they
378                                 are dropped on the next reboot. This
379                                 will have the effect that changes are
380                                 not made in subdirectories of
381                                 <filename>/etc</filename> but in
382                                 <filename>/run</filename>, with
383                                 identical immediate effects, however,
384                                 since the latter is lost on reboot,
385                                 the changes are lost
386                                 too.</para></listitem>
387                         </varlistentry>
388
389                         <varlistentry>
390                                 <term><option>-H</option></term>
391                                 <term><option>--host</option></term>
392
393                                 <listitem><para>Execute operation
394                                 remotely. Specify a hostname, or
395                                 username and hostname separated by @,
396                                 to connect to. This will use SSH to
397                                 talk to the remote systemd
398                                 instance.</para></listitem>
399                         </varlistentry>
400
401                         <varlistentry>
402                                 <term><option>-P</option></term>
403                                 <term><option>--privileged</option></term>
404
405                                 <listitem><para>Acquire privileges via
406                                 PolicyKit before executing the
407                                 operation.</para></listitem>
408                         </varlistentry>
409                 </variablelist>
410
411                 <para>The following commands are understood:</para>
412
413                 <variablelist>
414                         <varlistentry>
415                                 <term><command>list-units</command></term>
416
417                                 <listitem><para>List known units.</para></listitem>
418                         </varlistentry>
419                         <varlistentry>
420                                 <term><command>start [NAME...]</command></term>
421
422                                 <listitem><para>Start (activate) one
423                                 or more units specified on the command
424                                 line.</para></listitem>
425                         </varlistentry>
426                         <varlistentry>
427                                 <term><command>stop [NAME...]</command></term>
428
429                                 <listitem><para>Stop (deactivate) one
430                                 or more units specified on the command
431                                 line.</para></listitem>
432                         </varlistentry>
433                         <varlistentry>
434                                 <term><command>reload [NAME...]</command></term>
435
436                                 <listitem><para>Asks all units listed
437                                 on the command line to reload their
438                                 configuration. Note that this will
439                                 reload the service-specific
440                                 configuration, not the unit
441                                 configuration file of systemd. If you
442                                 want systemd to reload the
443                                 configuration file of a unit use the
444                                 <command>daemon-reload</command>
445                                 command. In other words: for the
446                                 example case of Apache, this will
447                                 reload Apache's
448                                 <filename>httpd.conf</filename> in the
449                                 web server, not the
450                                 <filename>apache.service</filename>
451                                 systemd unit file. </para>
452
453                                 <para>This command should not be
454                                 confused with the
455                                 <command>daemon-reload</command> or
456                                 <command>load</command>
457                                 commands.</para></listitem>
458
459                         </varlistentry>
460                         <varlistentry>
461                                 <term><command>restart [NAME...]</command></term>
462
463                                 <listitem><para>Restart one or more
464                                 units specified on the command
465                                 line. If the units are not running yet
466                                 they will be
467                                 started.</para></listitem>
468                         </varlistentry>
469                         <varlistentry>
470                                 <term><command>try-restart [NAME...]</command></term>
471
472                                 <listitem><para>Restart one or more
473                                 units specified on the command
474                                 line if the units are running. Do
475                                 nothing if units are not running.
476                                 Note that for compatibility
477                                 with Red Hat init scripts
478                                 <command>condrestart</command> is
479                                 equivalent to this command.</para></listitem>
480                         </varlistentry>
481                         <varlistentry>
482                                 <term><command>reload-or-restart [NAME...]</command></term>
483
484                                 <listitem><para>Reload one or more
485                                 units if they support it. If not,
486                                 restart them instead. If the units
487                                 are not running yet they will be
488                                 started.</para></listitem>
489                         </varlistentry>
490                         <varlistentry>
491                                 <term><command>reload-or-try-restart [NAME...]</command></term>
492
493                                 <listitem><para>Reload one or more
494                                 units if they support it. If not,
495                                 restart them instead. Do nothing if
496                                 the units are not running. Note that
497                                 for compatibility with SysV init
498                                 scripts
499                                 <command>force-reload</command> is
500                                 equivalent to this
501                                 command.</para></listitem>
502                         </varlistentry>
503                         <varlistentry>
504                                 <term><command>isolate [NAME]</command></term>
505
506                                 <listitem><para>Start the unit
507                                 specified on the command line and its
508                                 dependencies and stop all others.</para>
509
510                                 <para>This is similar to changing the
511                                 runlevel in a traditional init system. The
512                                 <command>isolate</command> command will
513                                 immediately stop processes that are not
514                                 enabled in the new unit, possibly including
515                                 the graphical environment or terminal you
516                                 are currently using.</para>
517
518                                 <para>Note that this works only on units
519                                 where <option>AllowIsolate=</option> is
520                                 enabled. See
521                                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
522                                 for details.</para></listitem>
523                         </varlistentry>
524                         <varlistentry>
525                                 <term><command>kill [NAME...]</command></term>
526
527                                 <listitem><para>Send a signal to one
528                                 or more processes of the unit. Use
529                                 <option>--kill-who=</option> to select
530                                 which process to kill. Use
531                                 <option>--kill-mode=</option> to
532                                 select the kill mode and
533                                 <option>--signal=</option> to select
534                                 the signal to send.</para></listitem>
535                         </varlistentry>
536                         <varlistentry>
537                                 <term><command>is-active [NAME...]</command></term>
538
539                                 <listitem><para>Check whether any of
540                                 the specified units are active
541                                 (i.e. running). Returns an exit code
542                                 0 if at least one is active, non-zero
543                                 otherwise. Unless
544                                 <option>--quiet</option> is specified
545                                 this will also print the current unit
546                                 state to STDOUT.</para></listitem>
547                         </varlistentry>
548                         <varlistentry>
549                                 <term><command>status [NAME...|PID...]</command></term>
550
551                                 <listitem><para>Show terse runtime
552                                 status information about one or more
553                                 units. This function is intended to
554                                 generate human-readable output. If you
555                                 are looking for computer-parsable
556                                 output, use <command>show</command>
557                                 instead. If a PID is passed
558                                 information about the unit the process
559                                 of the PID belongs to is
560                                 shown.</para></listitem>
561                         </varlistentry>
562                         <varlistentry>
563                                 <term><command>show [NAME...|JOB...]</command></term>
564
565                                 <listitem><para>Show properties of one
566                                 or more units, jobs or the manager
567                                 itself. If no argument is specified
568                                 properties of the manager will be
569                                 shown. If a unit name is specified
570                                 properties of the unit is shown, and
571                                 if a job id is specified properties of
572                                 the job is shown. By default, empty
573                                 properties are suppressed. Use
574                                 <option>--all</option> to show those
575                                 too. To select specific properties to
576                                 show use
577                                 <option>--property=</option>. This
578                                 command is intended to be used
579                                 whenever computer-parsable output is
580                                 required. Use
581                                 <command>status</command> if you are
582                                 looking for formatted human-readable
583                                 output.</para></listitem>
584                         </varlistentry>
585
586                         <varlistentry>
587                                 <term><command>reset-failed [NAME...]</command></term>
588
589                                 <listitem><para>Reset the
590                                 '<literal>failed</literal>' state of the
591                                 specified units, or if no unit name is
592                                 passed of all units. When a unit fails
593                                 in some way (i.e. process exiting with
594                                 non-zero error code, terminating
595                                 abnormally or timing out) it will
596                                 automatically enter the
597                                 '<literal>failed</literal>' state and
598                                 its exit code and status is recorded
599                                 for introspection by the administrator
600                                 until the service is restarted or
601                                 reset with this
602                                 command.</para></listitem>
603                         </varlistentry>
604
605                         <varlistentry>
606                                 <term><command>list-unit-files</command></term>
607
608                                 <listitem><para>List installed unit files.
609                                 </para></listitem>
610                         </varlistentry>
611
612                         <varlistentry>
613                                 <term><command>enable [NAME...]</command></term>
614
615                                 <listitem><para>Enable one or more
616                                 unit files, as specified on the
617                                 command line. This will create a
618                                 number of symlinks as encoded in the
619                                 <literal>[Install]</literal> sections
620                                 of the unit files. After the symlinks
621                                 have been created the systemd
622                                 configuration is reloaded (in a way
623                                 that is equivalent to
624                                 <command>daemon-reload</command>) to
625                                 ensure the changes are taken into
626                                 account immediately. Note that this
627                                 does not have the effect that any of
628                                 the units enabled are also started at
629                                 the same time. If this is desired a
630                                 separate <command>start</command>
631                                 command must be invoked for the
632                                 unit.</para>
633
634                                 <para>This command will
635                                 print the actions executed. This
636                                 output may be suppressed by passing
637                                 <option>--quiet</option>.</para>
638
639                                 <para>Note that this operation creates
640                                 only the suggested symlinks for the
641                                 units. While this command is the
642                                 recommended way to manipulate the unit
643                                 configuration directory, the
644                                 administrator is free to make
645                                 additional changes manually, by
646                                 placing or removing symlinks in the
647                                 directory. This is particularly useful
648                                 to create configurations that deviate
649                                 from the suggested default
650                                 installation. In this case the
651                                 administrator must make sure to invoke
652                                 <command>daemon-reload</command>
653                                 manually as necessary, to ensure his
654                                 changes are taken into account.</para>
655
656                                 <para>Enabling units should not be
657                                 confused with starting (activating)
658                                 units, as done by the
659                                 <command>start</command>
660                                 command. Enabling and starting units
661                                 is orthogonal: units may be enabled
662                                 without being started and started
663                                 without being enabled. Enabling simply
664                                 hooks the unit into various suggested
665                                 places (for example, so that the unit
666                                 is automatically started on boot or
667                                 when a particular kind of hardware is
668                                 plugged in). Starting actually spawns
669                                 the daemon process (in case of service
670                                 units), or binds the socket (in case
671                                 of socket units), and so
672                                 on.</para>
673
674                                 <para>Depending on whether
675                                 <option>--system</option>,
676                                 <option>--user</option> or
677                                 <option>--global</option> is specified
678                                 this enables the unit for the system,
679                                 for the calling user only
680                                 or for all future logins of all
681                                 users. Note that in the latter case no
682                                 systemd daemon configuration is
683                                 reloaded.</para>
684                                 </listitem>
685                         </varlistentry>
686
687                         <varlistentry>
688                                 <term><command>disable [NAME...]</command></term>
689
690                                 <listitem><para>Disables one or more
691                                 units. This removes all symlinks to
692                                 the specified unit files from the unit
693                                 configuration directory, and hence
694                                 undoes the changes made by
695                                 <command>enable</command>. Note
696                                 however that this removes
697                                 all symlinks to the unit files
698                                 (i.e. including manual additions), not
699                                 just those actually created by
700                                 <command>enable</command>. This call
701                                 implicitly reloads the systemd daemon
702                                 configuration after completing the
703                                 disabling of the units. Note that this
704                                 command does not implicitly stop the
705                                 units that is being disabled. If this
706                                 is desired an additional
707                                 <command>stop</command>command should
708                                 be executed afterwards.</para>
709
710                                 <para>This command will print the
711                                 actions executed. This output may be
712                                 suppressed by passing
713                                 <option>--quiet</option>.</para>
714                                 </listitem>
715
716                                 <para>This command honors
717                                 <option>--system</option>,
718                                 <option>--user</option>,
719                                 <option>--global</option> in a similar
720                                 way as
721                                 <command>enable</command>.</para>
722                         </varlistentry>
723
724                         <varlistentry>
725                                 <term><command>is-enabled [NAME...]</command></term>
726
727                                 <listitem><para>Checks whether any of
728                                 the specified unit files is enabled
729                                 (as with
730                                 <command>enable</command>). Returns an
731                                 exit code of 0 if at least one is
732                                 enabled, non-zero otherwise. Prints
733                                 the current enable status. To suppress
734                                 this output use
735                                 <option>--quiet</option>.</para></listitem>
736                         </varlistentry>
737
738                         <varlistentry>
739                                 <term><command>reenable [NAME...]</command></term>
740
741                                 <listitem><para>Reenable one or more
742                                 unit files, as specified on the
743                                 command line. This is a combination of
744                                 <command>disable</command> and
745                                 <command>enable</command> and is
746                                 useful to reset the symlinks a unit is
747                                 enabled with to the defaults
748                                 configured in the
749                                 <literal>[Install]</literal> section
750                                 of the unit file.</para>
751                                 </listitem>
752                         </varlistentry>
753
754                         <varlistentry>
755                                 <term><command>preset [NAME...]</command></term>
756
757                                 <listitem><para>Reset one or more unit
758                                 files, as specified on the command
759                                 line, to the defaults configured in a
760                                 preset file. This has the same effect
761                                 as <command>disable</command> or
762                                 <command>enable</command>, depending
763                                 how the unit is listed in the preset
764                                 files.</para>
765                                 </listitem>
766                         </varlistentry>
767
768                         <varlistentry>
769                                 <term><command>mask [NAME...]</command></term>
770
771                                 <listitem><para>Mask one or more unit
772                                 files, as specified on the command
773                                 line. This will link these units to
774                                 <filename>/dev/null</filename>, making
775                                 it impossible to start them. This is a stronger version
776                                 of <command>disable</command>, since
777                                 it prohibits all kinds of activation
778                                 of the unit, including manual
779                                 activation. Use this option with
780                                 care.</para>
781                                 </listitem>
782                         </varlistentry>
783
784                         <varlistentry>
785                                 <term><command>unmask [NAME...]</command></term>
786
787                                 <listitem><para>Unmask one or more
788                                 unit files, as specified on the
789                                 command line. This will undo the
790                                 effect of
791                                 <command>mask</command>.</para>
792                                 </listitem>
793                         </varlistentry>
794
795                         <varlistentry>
796                                 <term><command>link [NAME...]</command></term>
797
798                                 <listitem><para>Link a unit file that
799                                 is not in the unit file search paths
800                                 into the unit file search path. This
801                                 requires an absolute path to a unit
802                                 file. The effect of this can be undone
803                                 with <command>disable</command>. The
804                                 effect of this command is that a unit
805                                 file is available for
806                                 <command>start</command> and other
807                                 commands although it isn't installed
808                                 directly in the unit search
809                                 path.</para>
810                                 </listitem>
811                         </varlistentry>
812
813                         <varlistentry>
814                                 <term><command>load [NAME...]</command></term>
815
816                                 <listitem><para>Load one or more units
817                                 specified on the command line. This
818                                 will simply load their configuration
819                                 from disk, but not start them. To
820                                 start them you need to use the
821                                 <command>start</command> command which
822                                 will implicitly load a unit that has
823                                 not been loaded yet. Note that systemd
824                                 garbage collects loaded units that are
825                                 not active or referenced by an active
826                                 unit. This means that units loaded
827                                 this way will usually not stay loaded
828                                 for long. Also note that this command
829                                 cannot be used to reload unit
830                                 configuration. Use the
831                                 <command>daemon-reload</command>
832                                 command for that. All in all, this
833                                 command is of little use except for
834                                 debugging.</para>
835                                 <para>This command should not be
836                                 confused with the
837                                 <command>daemon-reload</command> or
838                                 <command>reload</command>
839                                 commands.</para></listitem>
840                         </varlistentry>
841                         <varlistentry>
842                                 <term><command>list-jobs</command></term>
843
844                                 <listitem><para>List jobs that are in progress.</para></listitem>
845                         </varlistentry>
846                         <varlistentry>
847                                 <term><command>cancel [JOB...]</command></term>
848
849                                 <listitem><para>Cancel one or more
850                                 jobs specified on the command line by
851                                 their numeric job
852                                 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
853                         </varlistentry>
854                         <varlistentry>
855                                 <term><command>dump</command></term>
856
857                                 <listitem><para>Dump server
858                                 status. This will output a (usually
859                                 very long) human readable manager
860                                 status dump. Its format is subject to
861                                 change without notice and should not
862                                 be parsed by
863                                 applications.</para></listitem>
864                         </varlistentry>
865                         <varlistentry>
866                                 <term><command>dot</command></term>
867
868                                 <listitem><para>Generate textual
869                                 dependency graph description in dot
870                                 format for further processing with the
871                                 GraphViz
872                                 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
873                                 tool. Use a command line like
874                                 <command>systemctl dot | dot -Tsvg >
875                                 systemd.svg</command> to generate a
876                                 graphical dependency tree. Unless
877                                 <option>--order</option> or
878                                 <option>--require</option> is passed
879                                 the generated graph will show both
880                                 ordering and requirement
881                                 dependencies.</para></listitem>
882                         </varlistentry>
883                         <varlistentry>
884                                 <term><command>snapshot [NAME]</command></term>
885
886                                 <listitem><para>Create a snapshot. If
887                                 a snapshot name is specified, the new
888                                 snapshot will be named after it. If
889                                 none is specified an automatic
890                                 snapshot name is generated. In either
891                                 case, the snapshot name used is
892                                 printed to STDOUT, unless
893                                 <option>--quiet</option> is
894                                 specified.</para>
895
896                                 <para>A snapshot refers to a saved
897                                 state of the systemd manager. It is
898                                 implemented itself as a unit that is
899                                 generated dynamically with this
900                                 command and has dependencies on all
901                                 units active at the time. At a later
902                                 time the user may return to this state
903                                 by using the
904                                 <command>isolate</command> command on
905                                 the snapshot unit.</para></listitem>
906
907                                 <para>Snapshots are only useful for
908                                 saving and restoring which units are
909                                 running or are stopped, they do not
910                                 save/restore any other
911                                 state. Snapshots are dynamic and lost
912                                 on reboot.</para>
913                         </varlistentry>
914                         <varlistentry>
915                                 <term><command>delete [NAME...]</command></term>
916
917                                 <listitem><para>Remove a snapshot
918                                 previously created with
919                                 <command>snapshot</command>.</para></listitem>
920                         </varlistentry>
921                         <varlistentry>
922                                 <term><command>daemon-reload</command></term>
923
924                                 <listitem><para>Reload systemd manager
925                                 configuration. This will reload all
926                                 unit files and recreate the entire
927                                 dependency tree. While the daemon is
928                                 reloaded, all sockets systemd listens
929                                 on on behalf of user configuration will
930                                 stay accessible.</para> <para>This
931                                 command should not be confused with
932                                 the <command>load</command> or
933                                 <command>reload</command>
934                                 commands.</para></listitem>
935                         </varlistentry>
936                         <varlistentry>
937                                 <term><command>daemon-reexec</command></term>
938
939                                 <listitem><para>Reexecute the systemd
940                                 manager. This will serialize the
941                                 manager state, reexecute the process
942                                 and deserialize the state again. This
943                                 command is of little use except for
944                                 debugging and package
945                                 upgrades. Sometimes it might be
946                                 helpful as a heavy-weight
947                                 <command>daemon-reload</command>. While
948                                 the daemon is reexecuted all sockets
949                                 systemd listens on on behalf of user
950                                 configuration will stay
951                                 accessible.</para></listitem>
952                         </varlistentry>
953                         <varlistentry>
954                                 <term><command>show-environment</command></term>
955
956                                 <listitem><para>Dump the systemd
957                                 manager environment block. The
958                                 environment block will be dumped in
959                                 straight-forward form suitable for
960                                 sourcing into a shell script. This
961                                 environment block will be passed to
962                                 all processes the manager
963                                 spawns.</para></listitem>
964                         </varlistentry>
965                         <varlistentry>
966                                 <term><command>set-environment [NAME=VALUE...]</command></term>
967
968                                 <listitem><para>Set one or more
969                                 systemd manager environment variables,
970                                 as specified on the command
971                                 line.</para></listitem>
972                         </varlistentry>
973                         <varlistentry>
974                                 <term><command>unset-environment [NAME...]</command></term>
975
976                                 <listitem><para>Unset one or more
977                                 systemd manager environment
978                                 variables. If only a variable name is
979                                 specified it will be removed
980                                 regardless of its value. If a variable
981                                 and a value are specified the variable
982                                 is only removed if it has the
983                                 specified value.</para></listitem>
984                         </varlistentry>
985                         <varlistentry>
986                                 <term><command>default</command></term>
987
988                                 <listitem><para>Enter default
989                                 mode. This is mostly equivalent to
990                                 <command>start
991                                 default.target</command>.</para></listitem>
992                         </varlistentry>
993                         <varlistentry>
994                                 <term><command>rescue</command></term>
995
996                                 <listitem><para>Enter rescue
997                                 mode. This is mostly equivalent to
998                                 <command>isolate
999                                 rescue.target</command> but also
1000                                 prints a wall message to all
1001                                 users.</para></listitem>
1002                         </varlistentry>
1003                         <varlistentry>
1004                                 <term><command>emergency</command></term>
1005
1006                                 <listitem><para>Enter emergency
1007                                 mode. This is mostly equivalent to
1008                                 <command>isolate
1009                                 emergency.target</command> but also
1010                                 prints a wall message to all
1011                                 users.</para></listitem>
1012                         </varlistentry>
1013                         <varlistentry>
1014                                 <term><command>halt</command></term>
1015
1016                                 <listitem><para>Shut down and halt the
1017                                 system. This is mostly equivalent to
1018                                 <command>start halt.target</command>
1019                                 but also prints a wall message to all
1020                                 users.  If
1021                                 combined with <option>--force</option>
1022                                 shutdown of all running services is
1023                                 skipped, however all processes are killed
1024                                 and all file systems are unmounted or
1025                                 mounted read-only, immediately
1026                                 followed by the
1027                                 system halt.</para></listitem>
1028                         </varlistentry>
1029                         <varlistentry>
1030                                 <term><command>poweroff</command></term>
1031
1032                                 <listitem><para>Shut down and
1033                                 power-off the system. This is mostly
1034                                 equivalent to <command>start
1035                                 poweroff.target</command> but also
1036                                 prints a wall message to all
1037                                 users. If
1038                                 combined with <option>--force</option>
1039                                 shutdown of all running services is
1040                                 skipped, however all processes are killed
1041                                 and all file systems are unmounted or
1042                                 mounted read-only, immediately
1043                                 followed by the
1044                                 powering off.</para></listitem>
1045                         </varlistentry>
1046                         <varlistentry>
1047                                 <term><command>reboot</command></term>
1048
1049                                 <listitem><para>Shut down and
1050                                 reboot the system. This is mostly
1051                                 equivalent to <command>start
1052                                 reboot.target</command> but also
1053                                 prints a wall message to all
1054                                 users. If
1055                                 combined with <option>--force</option>
1056                                 shutdown of all running services is
1057                                 skipped, however all processes are killed
1058                                 and all file systems are unmounted or
1059                                 mounted read-only, immediately
1060                                 followed by the
1061                                 reboot.</para></listitem>
1062                         </varlistentry>
1063                         <varlistentry>
1064                                 <term><command>kexec</command></term>
1065
1066                                 <listitem><para>Shut down and reboot
1067                                 the system via kexec. This is mostly
1068                                 equivalent to <command>start
1069                                 kexec.target</command> but also prints
1070                                 a wall message to all users. If
1071                                 combined with <option>--force</option>
1072                                 shutdown of all running services is
1073                                 skipped, however all processes are killed
1074                                 and all file systems are unmounted or
1075                                 mounted read-only, immediately
1076                                 followed by the
1077                                 reboot.</para></listitem>
1078                         </varlistentry>
1079                         <varlistentry>
1080                                 <term><command>exit</command></term>
1081
1082                                 <listitem><para>Ask the systemd
1083                                 manager to quit. This is only
1084                                 supported for user service managers
1085                                 (i.e. in conjunction with the
1086                                 <option>--user</option> option) and
1087                                 will fail otherwise.</para></listitem>
1088                         </varlistentry>
1089                 </variablelist>
1090
1091         </refsect1>
1092
1093         <refsect1>
1094                 <title>Exit status</title>
1095
1096                 <para>On success 0 is returned, a non-zero failure
1097                 code otherwise.</para>
1098         </refsect1>
1099
1100         <refsect1>
1101                 <title>Environment</title>
1102
1103                 <variablelist>
1104                         <varlistentry>
1105                                 <term><varname>$SYSTEMD_PAGER</varname></term>
1106                                 <listitem><para>Pager to use when
1107                                 <option>--no-pager</option> is not given;
1108                                 overrides <varname>$PAGER</varname>.  Setting
1109                                 this to an empty string or the value
1110                                 <literal>cat</literal> is equivalent to passing
1111                                 <option>--no-pager</option>.</para></listitem>
1112                         </varlistentry>
1113                 </variablelist>
1114         </refsect1>
1115
1116         <refsect1>
1117                 <title>See Also</title>
1118                 <para>
1119                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1120                         <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1121                         <citerefentry><refentrytitle>systemd-loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1122                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1123                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1124                         <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1125                 </para>
1126         </refsect1>
1127
1128 </refentry>