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