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