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