chiark / gitweb /
man: fix link to strerror(3)
[elogind.git] / man / systemd.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="systemd"
25     xmlns:xi="http://www.w3.org/2001/XInclude">
26
27   <refentryinfo>
28     <title>systemd</title>
29     <productname>systemd</productname>
30
31     <authorgroup>
32       <author>
33         <contrib>Developer</contrib>
34         <firstname>Lennart</firstname>
35         <surname>Poettering</surname>
36         <email>lennart@poettering.net</email>
37       </author>
38     </authorgroup>
39   </refentryinfo>
40
41   <refmeta>
42     <refentrytitle>systemd</refentrytitle>
43     <manvolnum>1</manvolnum>
44   </refmeta>
45
46   <refnamediv>
47     <refname>systemd</refname>
48     <refname>init</refname>
49     <refpurpose>systemd system and service manager</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <cmdsynopsis>
54       <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
55     </cmdsynopsis>
56     <cmdsynopsis>
57       <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
58     </cmdsynopsis>
59   </refsynopsisdiv>
60
61   <refsect1>
62     <title>Description</title>
63
64     <para>systemd is a system and service manager for Linux operating
65     systems. When run as first process on boot (as PID 1), it acts as
66     init system that brings up and maintains userspace
67     services.</para>
68
69     <para>For compatibility with SysV, if systemd is called as
70     <command>init</command> and a PID that is not 1, it will execute
71     <command>telinit</command> and pass all command line arguments
72     unmodified. That means <command>init</command> and
73     <command>telinit</command> are mostly equivalent when invoked from
74     normal login sessions. See
75     <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
76     for more information.</para>
77
78     <para>When run as a system instance, systemd interprets the
79     configuration file <filename>system.conf</filename> and the files
80     in <filename>system.conf.d</filename> directories; when run as a
81     user instance, systemd interprets the configuration file
82     <filename>user.conf</filename> and the files in
83     <filename>user.conf.d</filename> directories. See
84     <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
85     for more information.</para>
86   </refsect1>
87
88   <refsect1>
89     <title>Options</title>
90
91     <para>The following options are understood:</para>
92
93     <variablelist>
94       <varlistentry>
95         <term><option>--test</option></term>
96
97         <listitem><para>Determine startup sequence, dump it and exit.
98         This is an option useful for debugging only.</para></listitem>
99       </varlistentry>
100       <varlistentry>
101         <term><option>--dump-configuration-items</option></term>
102
103         <listitem><para>Dump understood unit configuration items. This
104         outputs a terse but complete list of configuration items
105         understood in unit definition files.</para></listitem>
106       </varlistentry>
107       <varlistentry>
108         <term><option>--unit=</option></term>
109
110         <listitem><para>Set default unit to activate on startup. If
111         not specified, defaults to
112         <filename>default.target</filename>.</para></listitem>
113       </varlistentry>
114       <varlistentry>
115         <term><option>--system</option></term>
116         <term><option>--user</option></term>
117
118         <listitem><para>For <option>--system</option>, tell systemd to
119         run a system instance, even if the process ID is not 1, i.e.
120         systemd is not run as init process. <option>--user</option>
121         does the opposite, running a user instance even if the process
122         ID is 1. Normally it should not be necessary to pass these
123         options, as systemd automatically detects the mode it is
124         started in. These options are hence of little use except for
125         debugging. Note that it is not supported booting and
126         maintaining a full system with systemd running in
127         <option>--system</option> mode, but PID not 1. In practice,
128         passing <option>--system</option> explicitly is only useful in
129         conjunction with <option>--test</option>.</para></listitem>
130       </varlistentry>
131       <varlistentry>
132         <term><option>--dump-core</option></term>
133
134         <listitem><para>Dump core on crash. This switch has no effect
135         when run as user instance.</para></listitem>
136       </varlistentry>
137       <varlistentry>
138         <term><option>--crash-shell</option></term>
139
140         <listitem><para>Run shell on
141         crash. This switch has no effect when
142         run as user
143         instance.</para></listitem>
144       </varlistentry>
145       <varlistentry>
146         <term><option>--confirm-spawn</option></term>
147
148         <listitem><para>Ask for confirmation when spawning processes.
149         This switch has no effect when run as user
150         instance.</para></listitem>
151       </varlistentry>
152       <varlistentry>
153         <term><option>--show-status=</option></term>
154
155         <listitem><para>Show terse service status information while
156         booting. This switch has no effect when run as user instance.
157         Takes a boolean argument which may be omitted which is
158         interpreted as <option>true</option>.</para></listitem>
159       </varlistentry>
160       <varlistentry>
161         <term><option>--log-target=</option></term>
162
163         <listitem><para>Set log target. Argument must be one of
164         <option>console</option>,
165         <option>journal</option>,
166         <option>kmsg</option>,
167         <option>journal-or-kmsg</option>,
168         <option>null</option>.</para></listitem>
169       </varlistentry>
170       <varlistentry>
171         <term><option>--log-level=</option></term>
172
173         <listitem><para>Set log level. As
174         argument this accepts a numerical log
175         level or the well-known <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
176         symbolic names (lowercase):
177         <option>emerg</option>,
178         <option>alert</option>,
179         <option>crit</option>,
180         <option>err</option>,
181         <option>warning</option>,
182         <option>notice</option>,
183         <option>info</option>,
184         <option>debug</option>.</para></listitem>
185       </varlistentry>
186       <varlistentry>
187         <term><option>--log-color=</option></term>
188
189         <listitem><para>Highlight important log messages. Argument is
190         a boolean value. If the argument is omitted, it defaults to
191         <option>true</option>.</para></listitem>
192       </varlistentry>
193       <varlistentry>
194         <term><option>--log-location=</option></term>
195
196         <listitem><para>Include code location in log messages. This is
197         mostly relevant for debugging purposes. Argument is a boolean
198         value. If the argument is omitted it defaults to
199         <option>true</option>.</para></listitem>
200       </varlistentry>
201       <varlistentry>
202         <term><option>--default-standard-output=</option></term>
203         <term><option>--default-standard-error=</option></term>
204
205         <listitem><para>Sets the default output or error output for
206         all services and sockets, respectively. That is, controls the
207         default for <option>StandardOutput=</option> and
208         <option>StandardError=</option> (see
209         <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
210         for details). Takes one of
211         <option>inherit</option>,
212         <option>null</option>,
213         <option>tty</option>,
214         <option>journal</option>,
215         <option>journal+console</option>,
216         <option>syslog</option>,
217         <option>syslog+console</option>,
218         <option>kmsg</option>,
219         <option>kmsg+console</option>.  If the
220         argument is omitted
221         <option>--default-standard-output=</option> defaults to
222         <option>journal</option> and
223         <option>--default-standard-error=</option> to
224         <option>inherit</option>.</para></listitem>
225       </varlistentry>
226
227       <xi:include href="standard-options.xml" xpointer="help" />
228       <xi:include href="standard-options.xml" xpointer="version" />
229     </variablelist>
230   </refsect1>
231
232   <refsect1>
233     <title>Concepts</title>
234
235     <para>systemd provides a dependency system between various
236     entities called "units" of 12 different types. Units encapsulate
237     various objects that are relevant for system boot-up and
238     maintenance. The majority of units are configured in unit
239     configuration files, whose syntax and basic set of options is
240     described in
241     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
242     however some are created automatically from other configuration,
243     dynamically from system state or programmatically at runtime.
244     Units may be "active" (meaning started, bound, plugged in, ...,
245     depending on the unit type, see below), or "inactive" (meaning
246     stopped, unbound, unplugged, ...), as well as in the process of
247     being activated or deactivated, i.e. between the two states (these
248     states are called "activating", "deactivating"). A special
249     "failed" state is available as well, which is very similar to
250     "inactive" and is entered when the service failed in some way
251     (process returned error code on exit, or crashed, or an operation
252     timed out). If this state is entered, the cause will be logged,
253     for later reference. Note that the various unit types may have a
254     number of additional substates, which are mapped to the five
255     generalized unit states described here.</para>
256
257     <para>The following unit types are available:</para>
258
259     <orderedlist>
260       <listitem><para>Service units, which start and control daemons
261       and the processes they consist of. For details see
262       <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
263
264       <listitem><para>Socket units, which encapsulate local IPC or
265       network sockets in the system, useful for socket-based
266       activation. For details about socket units see
267       <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
268       for details on socket-based activation and other forms of
269       activation, see
270       <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
271
272       <listitem><para>Target units are useful to group units, or
273       provide well-known synchronization points during boot-up, see
274       <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
275
276       <listitem><para>Device units expose kernel devices in systemd
277       and may be used to implement device-based activation. For
278       details see
279       <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
280
281       <listitem><para>Mount units control mount points in the file
282       system, for details see
283       <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
284
285       <listitem><para>Automount units provide automount capabilities,
286       for on-demand mounting of file systems as well as parallelized
287       boot-up. See
288       <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
289
290       <listitem><para>Snapshot units can be used to temporarily save
291       the state of the set of systemd units, which later may be
292       restored by activating the saved snapshot unit. For more
293       information see
294       <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
295
296       <listitem><para>Timer units are useful for triggering activation
297       of other units based on timers. You may find details in
298       <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
299
300       <listitem><para>Swap units are very similar to mount units and
301       encapsulate memory swap partitions or files of the operating
302       system. They are described in
303       <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
304
305       <listitem><para>Path units may be used to activate other
306       services when file system objects change or are modified. See
307       <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
308
309       <listitem><para>Slice units may be used to group units which
310       manage system processes (such as service and scope units) in a
311       hierarchical tree for resource management purposes. See
312       <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
313
314       <listitem><para>Scope units are similar to service units, but
315       manage foreign processes instead of starting them as well. See
316       <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
317
318     </orderedlist>
319
320     <para>Units are named as their configuration files. Some units
321     have special semantics. A detailed list is available in
322     <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
323
324     <para>systemd knows various kinds of dependencies, including
325     positive and negative requirement dependencies (i.e.
326     <varname>Requires=</varname> and <varname>Conflicts=</varname>) as
327     well as ordering dependencies (<varname>After=</varname> and
328     <varname>Before=</varname>). NB: ordering and requirement
329     dependencies are orthogonal. If only a requirement dependency
330     exists between two units (e.g. <filename>foo.service</filename>
331     requires <filename>bar.service</filename>), but no ordering
332     dependency (e.g. <filename>foo.service</filename> after
333     <filename>bar.service</filename>) and both are requested to start,
334     they will be started in parallel. It is a common pattern that both
335     requirement and ordering dependencies are placed between two
336     units. Also note that the majority of dependencies are implicitly
337     created and maintained by systemd. In most cases, it should be
338     unnecessary to declare additional dependencies manually, however
339     it is possible to do this.</para>
340
341     <para>Application programs and units (via dependencies) may
342     request state changes of units. In systemd, these requests are
343     encapsulated as 'jobs' and maintained in a job queue. Jobs may
344     succeed or can fail, their execution is ordered based on the
345     ordering dependencies of the units they have been scheduled
346     for.</para>
347
348     <para>On boot systemd activates the target unit
349     <filename>default.target</filename> whose job is to activate
350     on-boot services and other on-boot units by pulling them in via
351     dependencies. Usually the unit name is just an alias (symlink) for
352     either <filename>graphical.target</filename> (for fully-featured
353     boots into the UI) or <filename>multi-user.target</filename> (for
354     limited console-only boots for use in embedded or server
355     environments, or similar; a subset of graphical.target). However,
356     it is at the discretion of the administrator to configure it as an
357     alias to any other target unit. See
358     <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
359     for details about these target units.</para>
360
361     <para>Processes systemd spawns are placed in individual Linux
362     control groups named after the unit which they belong to in the
363     private systemd hierarchy. (see <ulink
364     url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
365     for more information about control groups, or short "cgroups").
366     systemd uses this to effectively keep track of processes. Control
367     group information is maintained in the kernel, and is accessible
368     via the file system hierarchy (beneath
369     <filename>/sys/fs/cgroup/systemd/</filename>), or in tools such as
370     <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
371     (<command>ps xawf -eo pid,user,cgroup,args</command> is
372     particularly useful to list all processes and the systemd units
373     they belong to.).</para>
374
375     <para>systemd is compatible with the SysV init system to a large
376     degree: SysV init scripts are supported and simply read as an
377     alternative (though limited) configuration file format. The SysV
378     <filename>/dev/initctl</filename> interface is provided, and
379     compatibility implementations of the various SysV client tools are
380     available. In addition to that, various established Unix
381     functionality such as <filename>/etc/fstab</filename> or the
382     <filename>utmp</filename> database are supported.</para>
383
384     <para>systemd has a minimal transaction system: if a unit is
385     requested to start up or shut down it will add it and all its
386     dependencies to a temporary transaction. Then, it will verify if
387     the transaction is consistent (i.e. whether the ordering of all
388     units is cycle-free). If it is not, systemd will try to fix it up,
389     and removes non-essential jobs from the transaction that might
390     remove the loop. Also, systemd tries to suppress non-essential
391     jobs in the transaction that would stop a running service. Finally
392     it is checked whether the jobs of the transaction contradict jobs
393     that have already been queued, and optionally the transaction is
394     aborted then. If all worked out and the transaction is consistent
395     and minimized in its impact it is merged with all already
396     outstanding jobs and added to the run queue. Effectively this
397     means that before executing a requested operation, systemd will
398     verify that it makes sense, fixing it if possible, and only
399     failing if it really cannot work.</para>
400
401     <para>Systemd contains native implementations of various tasks
402     that need to be executed as part of the boot process. For example,
403     it sets the hostname or configures the loopback network device. It
404     also sets up and mounts various API file systems, such as
405     <filename>/sys</filename> or <filename>/proc</filename>.</para>
406
407     <para>For more information about the concepts and
408     ideas behind systemd, please refer to the
409     <ulink url="http://0pointer.de/blog/projects/systemd.html">Original Design Document</ulink>.</para>
410
411     <para>Note that some but not all interfaces provided
412     by systemd are covered by the
413     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
414     Stability Promise</ulink>.</para>
415
416     <para>Units may be generated dynamically at boot and system
417     manager reload time, for example based on other configuration
418     files or parameters passed on the kernel command line. For details see
419     <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
420
421     <para>Systems which invoke systemd in a container or initrd
422     environment should implement the
423     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container Interface</ulink> or
424     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd Interface</ulink>
425     specifications, respectively.</para>
426   </refsect1>
427
428   <refsect1>
429     <title>Directories</title>
430
431     <variablelist>
432       <varlistentry>
433         <term>System unit directories</term>
434
435         <listitem><para>The systemd system manager reads unit
436         configuration from various directories. Packages that want to
437         install unit files shall place them in the directory returned
438         by <command>pkg-config systemd
439         --variable=systemdsystemunitdir</command>. Other directories
440         checked are <filename>/usr/local/lib/systemd/system</filename>
441         and <filename>/usr/lib/systemd/system</filename>. User
442         configuration always takes precedence. <command>pkg-config
443         systemd --variable=systemdsystemconfdir</command> returns the
444         path of the system configuration directory. Packages should
445         alter the content of these directories only with the
446         <command>enable</command> and <command>disable</command>
447         commands of the
448         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
449         tool. Full list of directories is provided in
450         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
451         </para></listitem>
452       </varlistentry>
453     </variablelist>
454
455     <variablelist>
456       <varlistentry>
457         <term>User unit directories</term>
458
459         <listitem><para>Similar rules apply for the user unit
460         directories. However, here the
461         <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
462         Base Directory specification</ulink> is followed to find
463         units. Applications should place their unit files in the
464         directory returned by <command>pkg-config systemd
465         --variable=systemduserunitdir</command>. Global configuration
466         is done in the directory reported by <command>pkg-config
467         systemd --variable=systemduserconfdir</command>. The
468         <command>enable</command> and <command>disable</command>
469         commands of the
470         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
471         tool can handle both global (i.e. for all users) and private
472         (for one user) enabling/disabling of units. Full list of
473         directories is provided in
474         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
475         </para></listitem>
476       </varlistentry>
477     </variablelist>
478
479     <variablelist>
480       <varlistentry>
481         <term>SysV init scripts directory</term>
482
483         <listitem><para>The location of the SysV init script directory
484         varies between distributions. If systemd cannot find a native
485         unit file for a requested service, it will look for a SysV
486         init script of the same name (with the
487         <filename>.service</filename> suffix
488         removed).</para></listitem>
489       </varlistentry>
490     </variablelist>
491
492     <variablelist>
493       <varlistentry>
494         <term>SysV runlevel link farm directory</term>
495
496         <listitem><para>The location of the SysV runlevel link farm
497         directory varies between distributions. systemd will take the
498         link farm into account when figuring out whether a service
499         shall be enabled. Note that a service unit with a native unit
500         configuration file cannot be started by activating it in the
501         SysV runlevel link farm.</para></listitem>
502       </varlistentry>
503     </variablelist>
504   </refsect1>
505
506   <refsect1>
507     <title>Signals</title>
508
509     <variablelist>
510       <varlistentry>
511         <term><constant>SIGTERM</constant></term>
512
513         <listitem><para>Upon receiving this signal the systemd system
514         manager serializes its state, reexecutes itself and
515         deserializes the saved state again. This is mostly equivalent
516         to <command>systemctl daemon-reexec</command>.</para>
517
518         <para>systemd user managers will start the
519         <filename>exit.target</filename> unit when this signal is
520         received. This is mostly equivalent to <command>systemctl
521         --user start exit.target</command>.</para></listitem>
522       </varlistentry>
523
524       <varlistentry>
525         <term><constant>SIGINT</constant></term>
526
527         <listitem><para>Upon receiving this signal the systemd system
528         manager will start the
529         <filename>ctrl-alt-del.target</filename> unit. This is mostly
530         equivalent to <command>systemctl start
531         ctl-alt-del.target</command>. If this signal is received more
532         often than 7 times per 2s an immediate reboot is triggered.
533         Note that pressing Ctrl-Alt-Del on the console will trigger
534         this signal. Hence, if a reboot is hanging pressing
535         Ctrl-Alt-Del more than 7 times in 2s is a relatively safe way
536         to trigger an immediate reboot.</para>
537
538         <para>systemd user managers treat this signal the same way as
539         <constant>SIGTERM</constant>.</para></listitem>
540       </varlistentry>
541
542       <varlistentry>
543         <term><constant>SIGWINCH</constant></term>
544
545         <listitem><para>When this signal is received the systemd
546         system manager will start the
547         <filename>kbrequest.target</filename> unit. This is mostly
548         equivalent to <command>systemctl start
549         kbrequest.target</command>.</para>
550
551         <para>This signal is ignored by systemd user
552         managers.</para></listitem>
553       </varlistentry>
554
555       <varlistentry>
556         <term><constant>SIGPWR</constant></term>
557
558         <listitem><para>When this signal is received the systemd
559         manager will start the <filename>sigpwr.target</filename>
560         unit. This is mostly equivalent to <command>systemctl start
561         sigpwr.target</command>.</para></listitem>
562       </varlistentry>
563
564       <varlistentry>
565         <term><constant>SIGUSR1</constant></term>
566
567         <listitem><para>When this signal is received the systemd
568         manager will try to reconnect to the D-Bus
569         bus.</para></listitem>
570       </varlistentry>
571
572       <varlistentry>
573         <term><constant>SIGUSR2</constant></term>
574
575         <listitem><para>When this signal is received the systemd
576         manager will log its complete state in human readable form.
577         The data logged is the same as printed by
578         <command>systemd-analyze dump</command>.</para></listitem>
579       </varlistentry>
580
581       <varlistentry>
582         <term><constant>SIGHUP</constant></term>
583
584         <listitem><para>Reloads the complete daemon configuration.
585         This is mostly equivalent to <command>systemctl
586         daemon-reload</command>.</para></listitem>
587       </varlistentry>
588
589       <varlistentry>
590         <term><constant>SIGRTMIN+0</constant></term>
591
592         <listitem><para>Enters default mode, starts the
593         <filename>default.target</filename> unit. This is mostly
594         equivalent to <command>systemctl start
595         default.target</command>.</para></listitem>
596       </varlistentry>
597
598       <varlistentry>
599         <term><constant>SIGRTMIN+1</constant></term>
600
601         <listitem><para>Enters rescue mode, starts the
602         <filename>rescue.target</filename> unit. This is mostly
603         equivalent to <command>systemctl isolate
604         rescue.target</command>.</para></listitem>
605       </varlistentry>
606
607       <varlistentry>
608         <term><constant>SIGRTMIN+2</constant></term>
609
610         <listitem><para>Enters emergency mode, starts the
611         <filename>emergency.service</filename> unit. This is mostly
612         equivalent to <command>systemctl isolate
613         emergency.service</command>.</para></listitem>
614       </varlistentry>
615
616       <varlistentry>
617         <term><constant>SIGRTMIN+3</constant></term>
618
619         <listitem><para>Halts the machine, starts the
620         <filename>halt.target</filename> unit. This is mostly
621         equivalent to <command>systemctl start
622         halt.target</command>.</para></listitem>
623       </varlistentry>
624
625       <varlistentry>
626         <term><constant>SIGRTMIN+4</constant></term>
627
628         <listitem><para>Powers off the machine, starts the
629         <filename>poweroff.target</filename> unit. This is mostly
630         equivalent to <command>systemctl start
631         poweroff.target</command>.</para></listitem>
632       </varlistentry>
633
634       <varlistentry>
635         <term><constant>SIGRTMIN+5</constant></term>
636
637         <listitem><para>Reboots the machine, starts the
638         <filename>reboot.target</filename> unit. This is mostly
639         equivalent to <command>systemctl start
640         reboot.target</command>.</para></listitem>
641       </varlistentry>
642
643       <varlistentry>
644         <term><constant>SIGRTMIN+6</constant></term>
645
646         <listitem><para>Reboots the machine via kexec, starts the
647         <filename>kexec.target</filename> unit. This is mostly
648         equivalent to <command>systemctl start
649         kexec.target</command>.</para></listitem>
650       </varlistentry>
651
652       <varlistentry>
653         <term><constant>SIGRTMIN+13</constant></term>
654
655         <listitem><para>Immediately halts the machine.</para></listitem>
656       </varlistentry>
657
658       <varlistentry>
659         <term><constant>SIGRTMIN+14</constant></term>
660
661         <listitem><para>Immediately powers off the machine.</para></listitem>
662       </varlistentry>
663
664       <varlistentry>
665         <term><constant>SIGRTMIN+15</constant></term>
666
667         <listitem><para>Immediately reboots the machine.</para></listitem>
668       </varlistentry>
669
670       <varlistentry>
671         <term><constant>SIGRTMIN+16</constant></term>
672
673         <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
674       </varlistentry>
675
676       <varlistentry>
677         <term><constant>SIGRTMIN+20</constant></term>
678
679         <listitem><para>Enables display of status messages on the
680         console, as controlled via
681         <varname>systemd.show_status=1</varname> on the kernel command
682         line.</para></listitem>
683       </varlistentry>
684
685       <varlistentry>
686         <term><constant>SIGRTMIN+21</constant></term>
687
688         <listitem><para>Disables display of
689         status messages on the console, as
690         controlled via
691         <varname>systemd.show_status=0</varname>
692         on the kernel command
693         line.</para></listitem>
694       </varlistentry>
695
696       <varlistentry>
697         <term><constant>SIGRTMIN+22</constant></term>
698         <term><constant>SIGRTMIN+23</constant></term>
699
700         <listitem><para>Sets the log level to <literal>debug</literal>
701         (or <literal>info</literal> on
702         <constant>SIGRTMIN+23</constant>), as controlled via
703         <varname>systemd.log_level=debug</varname> (or
704         <varname>systemd.log_level=info</varname> on
705         <constant>SIGRTMIN+23</constant>) on the kernel command
706         line.</para></listitem>
707       </varlistentry>
708
709       <varlistentry>
710         <term><constant>SIGRTMIN+24</constant></term>
711
712         <listitem><para>Immediately exits the manager (only available
713         for --user instances).</para></listitem>
714       </varlistentry>
715
716       <varlistentry>
717         <term><constant>SIGRTMIN+26</constant></term>
718         <term><constant>SIGRTMIN+27</constant></term>
719         <term><constant>SIGRTMIN+28</constant></term>
720
721         <listitem><para>Sets the log level to
722         <literal>journal-or-kmsg</literal> (or
723         <literal>console</literal> on
724         <constant>SIGRTMIN+27</constant>, <literal>kmsg</literal> on
725         <constant>SIGRTMIN+28</constant>), as controlled via
726         <varname>systemd.log_target=journal-or-kmsg</varname> (or
727         <varname>systemd.log_target=console</varname> on
728         <constant>SIGRTMIN+27</constant> or
729         <varname>systemd.log_target=kmsg</varname> on
730         <constant>SIGRTMIN+28</constant>) on the kernel command
731         line.</para></listitem>
732       </varlistentry>
733     </variablelist>
734   </refsect1>
735
736   <refsect1>
737     <title>Environment</title>
738
739     <variablelist class='environment-variables'>
740       <varlistentry>
741         <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
742         <listitem><para>systemd reads the log level from this
743         environment variable. This can be overridden with
744         <option>--log-level=</option>.</para></listitem>
745       </varlistentry>
746
747       <varlistentry>
748         <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
749         <listitem><para>systemd reads the log target from this
750         environment variable. This can be overridden with
751         <option>--log-target=</option>.</para></listitem>
752       </varlistentry>
753
754       <varlistentry>
755         <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
756         <listitem><para>Controls whether systemd highlights important
757         log messages. This can be overridden with
758         <option>--log-color=</option>.</para></listitem>
759       </varlistentry>
760
761       <varlistentry>
762         <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
763         <listitem><para>Controls whether systemd prints the code
764         location along with log messages. This can be overridden with
765         <option>--log-location=</option>.</para></listitem>
766       </varlistentry>
767
768       <varlistentry>
769         <term><varname>$XDG_CONFIG_HOME</varname></term>
770         <term><varname>$XDG_CONFIG_DIRS</varname></term>
771         <term><varname>$XDG_DATA_HOME</varname></term>
772         <term><varname>$XDG_DATA_DIRS</varname></term>
773
774         <listitem><para>The systemd user manager uses these variables
775         in accordance to the <ulink
776         url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
777         Base Directory specification</ulink> to find its
778         configuration.</para></listitem>
779       </varlistentry>
780
781       <varlistentry>
782         <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
783
784         <listitem><para>Controls where systemd looks for unit
785         files.</para></listitem>
786       </varlistentry>
787
788       <varlistentry>
789         <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
790
791         <listitem><para>Controls where systemd looks for SysV init
792         scripts.</para></listitem>
793       </varlistentry>
794
795       <varlistentry>
796         <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
797
798         <listitem><para>Controls where systemd looks for SysV init
799         script runlevel link farms.</para></listitem>
800       </varlistentry>
801
802       <varlistentry>
803         <term><varname>$LISTEN_PID</varname></term>
804         <term><varname>$LISTEN_FDS</varname></term>
805
806         <listitem><para>Set by systemd for supervised processes during
807         socket-based activation. See
808         <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
809         for more information. </para></listitem>
810       </varlistentry>
811
812       <varlistentry>
813         <term><varname>$NOTIFY_SOCKET</varname></term>
814
815         <listitem><para>Set by systemd for supervised processes for
816         status and start-up completion notification. See
817         <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
818         for more information. </para></listitem>
819       </varlistentry>
820     </variablelist>
821   </refsect1>
822
823   <refsect1>
824     <title>Kernel Command Line</title>
825
826     <para>When run as system instance systemd parses a number of
827     kernel command line arguments<footnote><para>If run inside a Linux
828     container these arguments may be passed as command line arguments
829     to systemd itself, next to any of the command line options listed
830     in the Options section above. If run outside of Linux containers,
831     these arguments are parsed from <filename>/proc/cmdline</filename>
832     instead.</para></footnote>:</para>
833
834     <variablelist class='kernel-commandline-options'>
835       <varlistentry>
836         <term><varname>systemd.unit=</varname></term>
837         <term><varname>rd.systemd.unit=</varname></term>
838
839         <listitem><para>Overrides the unit to activate on boot.
840         Defaults to <filename>default.target</filename>. This may be
841         used to temporarily boot into a different boot unit, for
842         example <filename>rescue.target</filename> or
843         <filename>emergency.service</filename>. See
844         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
845         for details about these units. The option prefixed with
846         <literal>rd.</literal> is honored only in the initial RAM disk
847         (initrd), while the one that is not prefixed only in the main
848         system.</para></listitem>
849       </varlistentry>
850
851       <varlistentry>
852         <term><varname>systemd.dump_core=</varname></term>
853
854         <listitem><para>Takes a boolean argument. If
855         <option>true</option>, systemd dumps core when it crashes.
856         Otherwise, no core dump is created. Defaults to
857         <option>true</option>.</para></listitem>
858       </varlistentry>
859
860       <varlistentry>
861         <term><varname>systemd.crash_shell=</varname></term>
862
863         <listitem><para>Takes a boolean argument. If
864         <option>true</option>, systemd spawns a shell when it crashes.
865         Otherwise, no shell is spawned. Defaults to
866         <option>false</option>, for security reasons, as the shell is
867         not protected by any password
868         authentication.</para></listitem>
869       </varlistentry>
870
871       <varlistentry>
872         <term><varname>systemd.crash_chvt=</varname></term>
873
874         <listitem><para>Takes an integer argument. If positive systemd
875         activates the specified virtual terminal when it crashes.
876         Defaults to <constant>-1</constant>.</para></listitem>
877       </varlistentry>
878
879       <varlistentry>
880         <term><varname>systemd.confirm_spawn=</varname></term>
881
882         <listitem><para>Takes a boolean argument. If
883         <option>true</option>, asks for confirmation when spawning
884         processes. Defaults to
885         <option>false</option>.</para></listitem>
886       </varlistentry>
887
888       <varlistentry>
889         <term><varname>systemd.show_status=</varname></term>
890
891         <listitem><para>Takes a boolean argument or the constant
892         <constant>auto</constant>. If <option>true</option>, shows
893         terse service status updates on the console during bootup.
894         <constant>auto</constant> behaves like <option>false</option>
895         until a service fails or there is a significant delay in boot.
896         Defaults to <option>true</option>, unless
897         <option>quiet</option> is passed as kernel command line option
898         in which case it defaults to
899         <constant>auto</constant>.</para></listitem>
900       </varlistentry>
901
902       <varlistentry>
903         <term><varname>systemd.log_target=</varname></term>
904         <term><varname>systemd.log_level=</varname></term>
905         <term><varname>systemd.log_color=</varname></term>
906         <term><varname>systemd.log_location=</varname></term>
907
908         <listitem><para>Controls log output, with the same effect as
909         the <varname>$SYSTEMD_LOG_TARGET</varname>,
910         <varname>$SYSTEMD_LOG_LEVEL</varname>,
911         <varname>$SYSTEMD_LOG_COLOR</varname>,
912         <varname>$SYSTEMD_LOG_LOCATION</varname> environment variables
913         described above.</para></listitem>
914       </varlistentry>
915
916       <varlistentry>
917         <term><varname>systemd.default_standard_output=</varname></term>
918         <term><varname>systemd.default_standard_error=</varname></term>
919         <listitem><para>Controls default standard output and error
920         output for services, with the same effect as the
921         <option>--default-standard-output=</option> and
922         <option>--default-standard-error=</option> command line
923         arguments described above, respectively.</para></listitem>
924       </varlistentry>
925
926       <varlistentry>
927         <term><varname>systemd.setenv=</varname></term>
928
929         <listitem><para>Takes a string argument in the form
930         VARIABLE=VALUE. May be used to set default environment
931         variables to add to forked child processes. May be used more
932         than once to set multiple variables.</para></listitem>
933       </varlistentry>
934
935       <varlistentry>
936         <term><varname>quiet</varname></term>
937
938         <listitem><para>Turn off status output at boot, much like
939         <varname>systemd.show_status=false</varname> would. Note that
940         this option is also read by the kernel itself and disables
941         kernel log output. Passing this option hence turns off the
942         usual output from both the system manager and the kernel.
943         </para></listitem>
944       </varlistentry>
945
946       <varlistentry>
947         <term><varname>debug</varname></term>
948
949         <listitem><para>Turn on debugging output. This is equivalent
950         to <varname>systemd.log_level=debug</varname>. Note that this
951         option is also read by the kernel itself and enables kernel
952         debug output. Passing this option hence turns on the debug
953         output from both the system manager and the
954         kernel.</para></listitem>
955       </varlistentry>
956
957       <varlistentry>
958         <term><varname>emergency</varname></term>
959         <term><varname>-b</varname></term>
960
961         <listitem><para>Boot into emergency mode. This is equivalent
962         to <varname>systemd.unit=emergency.target</varname> and
963         provided for compatibility reasons and to be easier to
964         type.</para></listitem>
965       </varlistentry>
966
967       <varlistentry>
968         <term><varname>rescue</varname></term>
969         <term><varname>single</varname></term>
970         <term><varname>s</varname></term>
971         <term><varname>S</varname></term>
972         <term><varname>1</varname></term>
973
974         <listitem><para>Boot into rescue mode. This is equivalent to
975         <varname>systemd.unit=rescue.target</varname> and provided for
976         compatibility reasons and to be easier to
977         type.</para></listitem>
978       </varlistentry>
979
980       <varlistentry>
981         <term><varname>2</varname></term>
982         <term><varname>3</varname></term>
983         <term><varname>4</varname></term>
984         <term><varname>5</varname></term>
985
986         <listitem><para>Boot into the specified legacy SysV runlevel.
987         These are equivalent to
988         <varname>systemd.unit=runlevel2.target</varname>,
989         <varname>systemd.unit=runlevel3.target</varname>,
990         <varname>systemd.unit=runlevel4.target</varname>, and
991         <varname>systemd.unit=runlevel5.target</varname>,
992         respectively, and provided for compatibility reasons and to be
993         easier to type.</para></listitem>
994       </varlistentry>
995
996       <varlistentry>
997         <term><varname>locale.LANG=</varname></term>
998         <term><varname>locale.LANGUAGE=</varname></term>
999         <term><varname>locale.LC_CTYPE=</varname></term>
1000         <term><varname>locale.LC_NUMERIC=</varname></term>
1001         <term><varname>locale.LC_TIME=</varname></term>
1002         <term><varname>locale.LC_COLLATE=</varname></term>
1003         <term><varname>locale.LC_MONETARY=</varname></term>
1004         <term><varname>locale.LC_MESSAGES=</varname></term>
1005         <term><varname>locale.LC_PAPER=</varname></term>
1006         <term><varname>locale.LC_NAME=</varname></term>
1007         <term><varname>locale.LC_ADDRESS=</varname></term>
1008         <term><varname>locale.LC_TELEPHONE=</varname></term>
1009         <term><varname>locale.LC_MEASUREMENT=</varname></term>
1010         <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1011
1012         <listitem><para>Set the system locale to use. This overrides
1013         the settings in <filename>/etc/locale.conf</filename>. For
1014         more information see
1015         <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1016         and
1017         <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1018         </para></listitem>
1019       </varlistentry>
1020     </variablelist>
1021
1022     <para>For other kernel command line parameters understood by
1023     components of the core OS, please refer to
1024     <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1025   </refsect1>
1026
1027   <refsect1>
1028     <title>Sockets and FIFOs</title>
1029
1030     <variablelist>
1031       <varlistentry>
1032         <term><filename>/run/systemd/notify</filename></term>
1033
1034         <listitem><para>Daemon status notification socket. This is an
1035         <constant>AF_UNIX</constant> datagram socket and is used to
1036         implement the daemon notification logic as implemented by
1037         <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1038
1039       </varlistentry>
1040
1041       <varlistentry>
1042         <term><filename>/run/systemd/shutdownd</filename></term>
1043
1044         <listitem><para>Used internally by the
1045         <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1046         tool to implement delayed shutdowns. This is an
1047         <constant>AF_UNIX</constant> datagram
1048         socket.</para></listitem>
1049       </varlistentry>
1050
1051       <varlistentry>
1052         <term><filename>/run/systemd/private</filename></term>
1053
1054         <listitem><para>Used internally as communication channel
1055         between
1056         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1057         and the systemd process. This is an
1058         <constant>AF_UNIX</constant> stream socket. This interface is
1059         private to systemd and should not be used in external
1060         projects.</para></listitem>
1061       </varlistentry>
1062
1063       <varlistentry>
1064         <term><filename>/dev/initctl</filename></term>
1065
1066         <listitem><para>Limited compatibility support for the SysV
1067         client interface, as implemented by the
1068         <filename>systemd-initctl.service</filename> unit. This is a
1069         named pipe in the file system. This interface is obsolete and
1070         should not be used in new applications.</para></listitem>
1071       </varlistentry>
1072     </variablelist>
1073   </refsect1>
1074
1075   <refsect1>
1076     <title>See Also</title>
1077     <para>
1078       The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1079       <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1080       <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1081       <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1082       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1083       <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1084       <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1085       <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1086       <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1087       <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1088       <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1089       <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1090       <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1091       <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1092     </para>
1093   </refsect1>
1094
1095 </refentry>