chiark / gitweb /
bus-proxy: tell Coverity we don't care about these return values
[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
419     see the
420     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators Specification</ulink>.</para>
421
422     <para>Systems which invoke systemd in a container or initrd
423     environment should implement the
424     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container Interface</ulink> or
425     <ulink url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd Interface</ulink>
426     specifications, respectively.</para>
427   </refsect1>
428
429   <refsect1>
430     <title>Directories</title>
431
432     <variablelist>
433       <varlistentry>
434         <term>System unit directories</term>
435
436         <listitem><para>The systemd system manager reads unit
437         configuration from various directories. Packages that want to
438         install unit files shall place them in the directory returned
439         by <command>pkg-config systemd
440         --variable=systemdsystemunitdir</command>. Other directories
441         checked are <filename>/usr/local/lib/systemd/system</filename>
442         and <filename>/usr/lib/systemd/system</filename>. User
443         configuration always takes precedence. <command>pkg-config
444         systemd --variable=systemdsystemconfdir</command> returns the
445         path of the system configuration directory. Packages should
446         alter the content of these directories only with the
447         <command>enable</command> and <command>disable</command>
448         commands of the
449         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
450         tool. Full list of directories is provided in
451         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
452         </para></listitem>
453       </varlistentry>
454     </variablelist>
455
456     <variablelist>
457       <varlistentry>
458         <term>User unit directories</term>
459
460         <listitem><para>Similar rules apply for the user unit
461         directories. However, here the
462         <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
463         Base Directory specification</ulink> is followed to find
464         units. Applications should place their unit files in the
465         directory returned by <command>pkg-config systemd
466         --variable=systemduserunitdir</command>. Global configuration
467         is done in the directory reported by <command>pkg-config
468         systemd --variable=systemduserconfdir</command>. The
469         <command>enable</command> and <command>disable</command>
470         commands of the
471         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
472         tool can handle both global (i.e. for all users) and private
473         (for one user) enabling/disabling of units. Full list of
474         directories is provided in
475         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
476         </para></listitem>
477       </varlistentry>
478     </variablelist>
479
480     <variablelist>
481       <varlistentry>
482         <term>SysV init scripts directory</term>
483
484         <listitem><para>The location of the SysV init script directory
485         varies between distributions. If systemd cannot find a native
486         unit file for a requested service, it will look for a SysV
487         init script of the same name (with the
488         <filename>.service</filename> suffix
489         removed).</para></listitem>
490       </varlistentry>
491     </variablelist>
492
493     <variablelist>
494       <varlistentry>
495         <term>SysV runlevel link farm directory</term>
496
497         <listitem><para>The location of the SysV runlevel link farm
498         directory varies between distributions. systemd will take the
499         link farm into account when figuring out whether a service
500         shall be enabled. Note that a service unit with a native unit
501         configuration file cannot be started by activating it in the
502         SysV runlevel link farm.</para></listitem>
503       </varlistentry>
504     </variablelist>
505   </refsect1>
506
507   <refsect1>
508     <title>Signals</title>
509
510     <variablelist>
511       <varlistentry>
512         <term><constant>SIGTERM</constant></term>
513
514         <listitem><para>Upon receiving this signal the systemd system
515         manager serializes its state, reexecutes itself and
516         deserializes the saved state again. This is mostly equivalent
517         to <command>systemctl daemon-reexec</command>.</para>
518
519         <para>systemd user managers will start the
520         <filename>exit.target</filename> unit when this signal is
521         received. This is mostly equivalent to <command>systemctl
522         --user start exit.target</command>.</para></listitem>
523       </varlistentry>
524
525       <varlistentry>
526         <term><constant>SIGINT</constant></term>
527
528         <listitem><para>Upon receiving this signal the systemd system
529         manager will start the
530         <filename>ctrl-alt-del.target</filename> unit. This is mostly
531         equivalent to <command>systemctl start
532         ctl-alt-del.target</command>. If this signal is received more
533         often than 7 times per 2s an immediate reboot is triggered.
534         Note that pressing Ctrl-Alt-Del on the console will trigger
535         this signal. Hence, if a reboot is hanging pressing
536         Ctrl-Alt-Del more than 7 times in 2s is a relatively safe way
537         to trigger an immediate reboot.</para>
538
539         <para>systemd user managers treat this signal the same way as
540         <constant>SIGTERM</constant>.</para></listitem>
541       </varlistentry>
542
543       <varlistentry>
544         <term><constant>SIGWINCH</constant></term>
545
546         <listitem><para>When this signal is received the systemd
547         system manager will start the
548         <filename>kbrequest.target</filename> unit. This is mostly
549         equivalent to <command>systemctl start
550         kbrequest.target</command>.</para>
551
552         <para>This signal is ignored by systemd user
553         managers.</para></listitem>
554       </varlistentry>
555
556       <varlistentry>
557         <term><constant>SIGPWR</constant></term>
558
559         <listitem><para>When this signal is received the systemd
560         manager will start the <filename>sigpwr.target</filename>
561         unit. This is mostly equivalent to <command>systemctl start
562         sigpwr.target</command>.</para></listitem>
563       </varlistentry>
564
565       <varlistentry>
566         <term><constant>SIGUSR1</constant></term>
567
568         <listitem><para>When this signal is received the systemd
569         manager will try to reconnect to the D-Bus
570         bus.</para></listitem>
571       </varlistentry>
572
573       <varlistentry>
574         <term><constant>SIGUSR2</constant></term>
575
576         <listitem><para>When this signal is received the systemd
577         manager will log its complete state in human readable form.
578         The data logged is the same as printed by
579         <command>systemd-analyze dump</command>.</para></listitem>
580       </varlistentry>
581
582       <varlistentry>
583         <term><constant>SIGHUP</constant></term>
584
585         <listitem><para>Reloads the complete daemon configuration.
586         This is mostly equivalent to <command>systemctl
587         daemon-reload</command>.</para></listitem>
588       </varlistentry>
589
590       <varlistentry>
591         <term><constant>SIGRTMIN+0</constant></term>
592
593         <listitem><para>Enters default mode, starts the
594         <filename>default.target</filename> unit. This is mostly
595         equivalent to <command>systemctl start
596         default.target</command>.</para></listitem>
597       </varlistentry>
598
599       <varlistentry>
600         <term><constant>SIGRTMIN+1</constant></term>
601
602         <listitem><para>Enters rescue mode, starts the
603         <filename>rescue.target</filename> unit. This is mostly
604         equivalent to <command>systemctl isolate
605         rescue.target</command>.</para></listitem>
606       </varlistentry>
607
608       <varlistentry>
609         <term><constant>SIGRTMIN+2</constant></term>
610
611         <listitem><para>Enters emergency mode, starts the
612         <filename>emergency.service</filename> unit. This is mostly
613         equivalent to <command>systemctl isolate
614         emergency.service</command>.</para></listitem>
615       </varlistentry>
616
617       <varlistentry>
618         <term><constant>SIGRTMIN+3</constant></term>
619
620         <listitem><para>Halts the machine, starts the
621         <filename>halt.target</filename> unit. This is mostly
622         equivalent to <command>systemctl start
623         halt.target</command>.</para></listitem>
624       </varlistentry>
625
626       <varlistentry>
627         <term><constant>SIGRTMIN+4</constant></term>
628
629         <listitem><para>Powers off the machine, starts the
630         <filename>poweroff.target</filename> unit. This is mostly
631         equivalent to <command>systemctl start
632         poweroff.target</command>.</para></listitem>
633       </varlistentry>
634
635       <varlistentry>
636         <term><constant>SIGRTMIN+5</constant></term>
637
638         <listitem><para>Reboots the machine, starts the
639         <filename>reboot.target</filename> unit. This is mostly
640         equivalent to <command>systemctl start
641         reboot.target</command>.</para></listitem>
642       </varlistentry>
643
644       <varlistentry>
645         <term><constant>SIGRTMIN+6</constant></term>
646
647         <listitem><para>Reboots the machine via kexec, starts the
648         <filename>kexec.target</filename> unit. This is mostly
649         equivalent to <command>systemctl start
650         kexec.target</command>.</para></listitem>
651       </varlistentry>
652
653       <varlistentry>
654         <term><constant>SIGRTMIN+13</constant></term>
655
656         <listitem><para>Immediately halts the machine.</para></listitem>
657       </varlistentry>
658
659       <varlistentry>
660         <term><constant>SIGRTMIN+14</constant></term>
661
662         <listitem><para>Immediately powers off the machine.</para></listitem>
663       </varlistentry>
664
665       <varlistentry>
666         <term><constant>SIGRTMIN+15</constant></term>
667
668         <listitem><para>Immediately reboots the machine.</para></listitem>
669       </varlistentry>
670
671       <varlistentry>
672         <term><constant>SIGRTMIN+16</constant></term>
673
674         <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
675       </varlistentry>
676
677       <varlistentry>
678         <term><constant>SIGRTMIN+20</constant></term>
679
680         <listitem><para>Enables display of status messages on the
681         console, as controlled via
682         <varname>systemd.show_status=1</varname> on the kernel command
683         line.</para></listitem>
684       </varlistentry>
685
686       <varlistentry>
687         <term><constant>SIGRTMIN+21</constant></term>
688
689         <listitem><para>Disables display of
690         status messages on the console, as
691         controlled via
692         <varname>systemd.show_status=0</varname>
693         on the kernel command
694         line.</para></listitem>
695       </varlistentry>
696
697       <varlistentry>
698         <term><constant>SIGRTMIN+22</constant></term>
699         <term><constant>SIGRTMIN+23</constant></term>
700
701         <listitem><para>Sets the log level to <literal>debug</literal>
702         (or <literal>info</literal> on
703         <constant>SIGRTMIN+23</constant>), as controlled via
704         <varname>systemd.log_level=debug</varname> (or
705         <varname>systemd.log_level=info</varname> on
706         <constant>SIGRTMIN+23</constant>) on the kernel command
707         line.</para></listitem>
708       </varlistentry>
709
710       <varlistentry>
711         <term><constant>SIGRTMIN+24</constant></term>
712
713         <listitem><para>Immediately exits the manager (only available
714         for --user instances).</para></listitem>
715       </varlistentry>
716
717       <varlistentry>
718         <term><constant>SIGRTMIN+26</constant></term>
719         <term><constant>SIGRTMIN+27</constant></term>
720         <term><constant>SIGRTMIN+28</constant></term>
721
722         <listitem><para>Sets the log level to
723         <literal>journal-or-kmsg</literal> (or
724         <literal>console</literal> on
725         <constant>SIGRTMIN+27</constant>, <literal>kmsg</literal> on
726         <constant>SIGRTMIN+28</constant>), as controlled via
727         <varname>systemd.log_target=journal-or-kmsg</varname> (or
728         <varname>systemd.log_target=console</varname> on
729         <constant>SIGRTMIN+27</constant> or
730         <varname>systemd.log_target=kmsg</varname> on
731         <constant>SIGRTMIN+28</constant>) on the kernel command
732         line.</para></listitem>
733       </varlistentry>
734     </variablelist>
735   </refsect1>
736
737   <refsect1>
738     <title>Environment</title>
739
740     <variablelist class='environment-variables'>
741       <varlistentry>
742         <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
743         <listitem><para>systemd reads the log level from this
744         environment variable. This can be overridden with
745         <option>--log-level=</option>.</para></listitem>
746       </varlistentry>
747
748       <varlistentry>
749         <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
750         <listitem><para>systemd reads the log target from this
751         environment variable. This can be overridden with
752         <option>--log-target=</option>.</para></listitem>
753       </varlistentry>
754
755       <varlistentry>
756         <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
757         <listitem><para>Controls whether systemd highlights important
758         log messages. This can be overridden with
759         <option>--log-color=</option>.</para></listitem>
760       </varlistentry>
761
762       <varlistentry>
763         <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
764         <listitem><para>Controls whether systemd prints the code
765         location along with log messages. This can be overridden with
766         <option>--log-location=</option>.</para></listitem>
767       </varlistentry>
768
769       <varlistentry>
770         <term><varname>$XDG_CONFIG_HOME</varname></term>
771         <term><varname>$XDG_CONFIG_DIRS</varname></term>
772         <term><varname>$XDG_DATA_HOME</varname></term>
773         <term><varname>$XDG_DATA_DIRS</varname></term>
774
775         <listitem><para>The systemd user manager uses these variables
776         in accordance to the <ulink
777         url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
778         Base Directory specification</ulink> to find its
779         configuration.</para></listitem>
780       </varlistentry>
781
782       <varlistentry>
783         <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
784
785         <listitem><para>Controls where systemd looks for unit
786         files.</para></listitem>
787       </varlistentry>
788
789       <varlistentry>
790         <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
791
792         <listitem><para>Controls where systemd looks for SysV init
793         scripts.</para></listitem>
794       </varlistentry>
795
796       <varlistentry>
797         <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
798
799         <listitem><para>Controls where systemd looks for SysV init
800         script runlevel link farms.</para></listitem>
801       </varlistentry>
802
803       <varlistentry>
804         <term><varname>$LISTEN_PID</varname></term>
805         <term><varname>$LISTEN_FDS</varname></term>
806
807         <listitem><para>Set by systemd for supervised processes during
808         socket-based activation. See
809         <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
810         for more information. </para></listitem>
811       </varlistentry>
812
813       <varlistentry>
814         <term><varname>$NOTIFY_SOCKET</varname></term>
815
816         <listitem><para>Set by systemd for supervised processes for
817         status and start-up completion notification. See
818         <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
819         for more information. </para></listitem>
820       </varlistentry>
821     </variablelist>
822   </refsect1>
823
824   <refsect1>
825     <title>Kernel Command Line</title>
826
827     <para>When run as system instance systemd parses a number of
828     kernel command line arguments<footnote><para>If run inside a Linux
829     container these arguments may be passed as command line arguments
830     to systemd itself, next to any of the command line options listed
831     in the Options section above. If run outside of Linux containers,
832     these arguments are parsed from <filename>/proc/cmdline</filename>
833     instead.</para></footnote>:</para>
834
835     <variablelist class='kernel-commandline-options'>
836       <varlistentry>
837         <term><varname>systemd.unit=</varname></term>
838         <term><varname>rd.systemd.unit=</varname></term>
839
840         <listitem><para>Overrides the unit to activate on boot.
841         Defaults to <filename>default.target</filename>. This may be
842         used to temporarily boot into a different boot unit, for
843         example <filename>rescue.target</filename> or
844         <filename>emergency.service</filename>. See
845         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
846         for details about these units. The option prefixed with
847         <literal>rd.</literal> is honored only in the initial RAM disk
848         (initrd), while the one that is not prefixed only in the main
849         system.</para></listitem>
850       </varlistentry>
851
852       <varlistentry>
853         <term><varname>systemd.dump_core=</varname></term>
854
855         <listitem><para>Takes a boolean argument. If
856         <option>true</option>, systemd dumps core when it crashes.
857         Otherwise, no core dump is created. Defaults to
858         <option>true</option>.</para></listitem>
859       </varlistentry>
860
861       <varlistentry>
862         <term><varname>systemd.crash_shell=</varname></term>
863
864         <listitem><para>Takes a boolean argument. If
865         <option>true</option>, systemd spawns a shell when it crashes.
866         Otherwise, no shell is spawned. Defaults to
867         <option>false</option>, for security reasons, as the shell is
868         not protected by any password
869         authentication.</para></listitem>
870       </varlistentry>
871
872       <varlistentry>
873         <term><varname>systemd.crash_chvt=</varname></term>
874
875         <listitem><para>Takes an integer argument. If positive systemd
876         activates the specified virtual terminal when it crashes.
877         Defaults to <constant>-1</constant>.</para></listitem>
878       </varlistentry>
879
880       <varlistentry>
881         <term><varname>systemd.confirm_spawn=</varname></term>
882
883         <listitem><para>Takes a boolean argument. If
884         <option>true</option>, asks for confirmation when spawning
885         processes. Defaults to
886         <option>false</option>.</para></listitem>
887       </varlistentry>
888
889       <varlistentry>
890         <term><varname>systemd.show_status=</varname></term>
891
892         <listitem><para>Takes a boolean argument or the constant
893         <constant>auto</constant>. If <option>true</option>, shows
894         terse service status updates on the console during bootup.
895         <constant>auto</constant> behaves like <option>false</option>
896         until a service fails or there is a significant delay in boot.
897         Defaults to <option>true</option>, unless
898         <option>quiet</option> is passed as kernel command line option
899         in which case it defaults to
900         <constant>auto</constant>.</para></listitem>
901       </varlistentry>
902
903       <varlistentry>
904         <term><varname>systemd.log_target=</varname></term>
905         <term><varname>systemd.log_level=</varname></term>
906         <term><varname>systemd.log_color=</varname></term>
907         <term><varname>systemd.log_location=</varname></term>
908
909         <listitem><para>Controls log output, with the same effect as
910         the <varname>$SYSTEMD_LOG_TARGET</varname>,
911         <varname>$SYSTEMD_LOG_LEVEL</varname>,
912         <varname>$SYSTEMD_LOG_COLOR</varname>,
913         <varname>$SYSTEMD_LOG_LOCATION</varname> environment variables
914         described above.</para></listitem>
915       </varlistentry>
916
917       <varlistentry>
918         <term><varname>systemd.default_standard_output=</varname></term>
919         <term><varname>systemd.default_standard_error=</varname></term>
920         <listitem><para>Controls default standard output and error
921         output for services, with the same effect as the
922         <option>--default-standard-output=</option> and
923         <option>--default-standard-error=</option> command line
924         arguments described above, respectively.</para></listitem>
925       </varlistentry>
926
927       <varlistentry>
928         <term><varname>systemd.setenv=</varname></term>
929
930         <listitem><para>Takes a string argument in the form
931         VARIABLE=VALUE. May be used to set default environment
932         variables to add to forked child processes. May be used more
933         than once to set multiple variables.</para></listitem>
934       </varlistentry>
935
936       <varlistentry>
937         <term><varname>quiet</varname></term>
938
939         <listitem><para>Turn off status output at boot, much like
940         <varname>systemd.show_status=false</varname> would. Note that
941         this option is also read by the kernel itself and disables
942         kernel log output. Passing this option hence turns off the
943         usual output from both the system manager and the kernel.
944         </para></listitem>
945       </varlistentry>
946
947       <varlistentry>
948         <term><varname>debug</varname></term>
949
950         <listitem><para>Turn on debugging output. This is equivalent
951         to <varname>systemd.log_level=debug</varname>. Note that this
952         option is also read by the kernel itself and enables kernel
953         debug output. Passing this option hence turns on the debug
954         output from both the system manager and the
955         kernel.</para></listitem>
956       </varlistentry>
957
958       <varlistentry>
959         <term><varname>emergency</varname></term>
960         <term><varname>-b</varname></term>
961
962         <listitem><para>Boot into emergency mode. This is equivalent
963         to <varname>systemd.unit=emergency.target</varname> and
964         provided for compatibility reasons and to be easier to
965         type.</para></listitem>
966       </varlistentry>
967
968       <varlistentry>
969         <term><varname>rescue</varname></term>
970         <term><varname>single</varname></term>
971         <term><varname>s</varname></term>
972         <term><varname>S</varname></term>
973         <term><varname>1</varname></term>
974
975         <listitem><para>Boot into rescue mode. This is equivalent to
976         <varname>systemd.unit=rescue.target</varname> and provided for
977         compatibility reasons and to be easier to
978         type.</para></listitem>
979       </varlistentry>
980
981       <varlistentry>
982         <term><varname>2</varname></term>
983         <term><varname>3</varname></term>
984         <term><varname>4</varname></term>
985         <term><varname>5</varname></term>
986
987         <listitem><para>Boot into the specified legacy SysV runlevel.
988         These are equivalent to
989         <varname>systemd.unit=runlevel2.target</varname>,
990         <varname>systemd.unit=runlevel3.target</varname>,
991         <varname>systemd.unit=runlevel4.target</varname>, and
992         <varname>systemd.unit=runlevel5.target</varname>,
993         respectively, and provided for compatibility reasons and to be
994         easier to type.</para></listitem>
995       </varlistentry>
996
997       <varlistentry>
998         <term><varname>locale.LANG=</varname></term>
999         <term><varname>locale.LANGUAGE=</varname></term>
1000         <term><varname>locale.LC_CTYPE=</varname></term>
1001         <term><varname>locale.LC_NUMERIC=</varname></term>
1002         <term><varname>locale.LC_TIME=</varname></term>
1003         <term><varname>locale.LC_COLLATE=</varname></term>
1004         <term><varname>locale.LC_MONETARY=</varname></term>
1005         <term><varname>locale.LC_MESSAGES=</varname></term>
1006         <term><varname>locale.LC_PAPER=</varname></term>
1007         <term><varname>locale.LC_NAME=</varname></term>
1008         <term><varname>locale.LC_ADDRESS=</varname></term>
1009         <term><varname>locale.LC_TELEPHONE=</varname></term>
1010         <term><varname>locale.LC_MEASUREMENT=</varname></term>
1011         <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1012
1013         <listitem><para>Set the system locale to use. This overrides
1014         the settings in <filename>/etc/locale.conf</filename>. For
1015         more information see
1016         <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1017         and
1018         <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1019         </para></listitem>
1020       </varlistentry>
1021     </variablelist>
1022
1023     <para>For other kernel command line parameters understood by
1024     components of the core OS, please refer to
1025     <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1026   </refsect1>
1027
1028   <refsect1>
1029     <title>Sockets and FIFOs</title>
1030
1031     <variablelist>
1032       <varlistentry>
1033         <term><filename>/run/systemd/notify</filename></term>
1034
1035         <listitem><para>Daemon status notification socket. This is an
1036         <constant>AF_UNIX</constant> datagram socket and is used to
1037         implement the daemon notification logic as implemented by
1038         <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1039
1040       </varlistentry>
1041
1042       <varlistentry>
1043         <term><filename>/run/systemd/shutdownd</filename></term>
1044
1045         <listitem><para>Used internally by the
1046         <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1047         tool to implement delayed shutdowns. This is an
1048         <constant>AF_UNIX</constant> datagram
1049         socket.</para></listitem>
1050       </varlistentry>
1051
1052       <varlistentry>
1053         <term><filename>/run/systemd/private</filename></term>
1054
1055         <listitem><para>Used internally as communication channel
1056         between
1057         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1058         and the systemd process. This is an
1059         <constant>AF_UNIX</constant> stream socket. This interface is
1060         private to systemd and should not be used in external
1061         projects.</para></listitem>
1062       </varlistentry>
1063
1064       <varlistentry>
1065         <term><filename>/dev/initctl</filename></term>
1066
1067         <listitem><para>Limited compatibility support for the SysV
1068         client interface, as implemented by the
1069         <filename>systemd-initctl.service</filename> unit. This is a
1070         named pipe in the file system. This interface is obsolete and
1071         should not be used in new applications.</para></listitem>
1072       </varlistentry>
1073     </variablelist>
1074   </refsect1>
1075
1076   <refsect1>
1077     <title>See Also</title>
1078     <para>
1079       The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1080       <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1081       <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1082       <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1083       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1084       <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1085       <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1086       <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1087       <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1088       <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1089       <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1090       <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1091       <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1092       <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1093     </para>
1094   </refsect1>
1095
1096 </refentry>