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