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