chiark / gitweb /
units: add explicit dependency on display-manager.service to graphical.target
[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
484                 <para>Units may be generated dynamically at boot and
485                 system manager reload time, for example based on other
486                 configuration files or parameters passed on the kernel
487                 command line. For details see the <ulink
488                 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
489                 Specification</ulink>.</para>
490         </refsect1>
491
492         <refsect1>
493                 <title>Directories</title>
494
495                 <variablelist>
496                         <varlistentry>
497                                 <term>System unit directories</term>
498
499                                 <listitem><para>The systemd system
500                                 manager reads unit configuration from
501                                 various directories. Packages that
502                                 want to install unit files shall place
503                                 them in the directory returned by
504                                 <command>pkg-config systemd
505                                 --variable=systemdsystemunitdir</command>. Other
506                                 directories checked are
507                                 <filename>/usr/local/lib/systemd/system</filename>
508                                 and
509                                 <filename>/usr/lib/systemd/system</filename>. User
510                                 configuration always takes
511                                 precedence. <command>pkg-config
512                                 systemd
513                                 --variable=systemdsystemconfdir</command>
514                                 returns the path of the system
515                                 configuration directory. Packages
516                                 should alter the content of these
517                                 directories only with the
518                                 <command>enable</command> and
519                                 <command>disable</command> commands of
520                                 the
521                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
522                                 tool.</para></listitem>
523                         </varlistentry>
524                 </variablelist>
525
526                 <variablelist>
527                         <varlistentry>
528                                 <term>User unit directories</term>
529
530                                 <listitem><para>Similar rules apply
531                                 for the user unit
532                                 directories. However, here the <ulink
533                                 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
534                                 Base Directory specification</ulink>
535                                 is followed to find
536                                 units. Applications should place their
537                                 unit files in the directory returned
538                                 by <command>pkg-config systemd
539                                 --variable=systemduserunitdir</command>. Global
540                                 configuration is done in the directory
541                                 reported by <command>pkg-config
542                                 systemd
543                                 --variable=systemduserconfdir</command>. The
544                                 <command>enable</command> and
545                                 <command>disable</command> commands of
546                                 the
547                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
548                                 tool can handle both global (i.e. for
549                                 all users) and private (for one user)
550                                 enabling/disabling of
551                                 units.</para></listitem>
552                         </varlistentry>
553                 </variablelist>
554
555                 <variablelist>
556                         <varlistentry>
557                                 <term>SysV init scripts directory</term>
558
559                                 <listitem><para>The location of the
560                                 SysV init script directory varies
561                                 between distributions. If systemd
562                                 cannot find a native unit file for a
563                                 requested service, it will look for a
564                                 SysV init script of the same name
565                                 (with the
566                                 <filename>.service</filename> suffix
567                                 removed).</para></listitem>
568                         </varlistentry>
569                 </variablelist>
570
571                 <variablelist>
572                         <varlistentry>
573                                 <term>SysV runlevel link farm directory</term>
574
575                                 <listitem><para>The location of the
576                                 SysV runlevel link farm directory
577                                 varies between distributions. systemd
578                                 will take the link farm into account
579                                 when figuring out whether a service
580                                 shall be enabled. Note that a service
581                                 unit with a native unit configuration
582                                 file cannot be started by activating it
583                                 in the SysV runlevel link
584                                 farm.</para></listitem>
585                         </varlistentry>
586                 </variablelist>
587         </refsect1>
588
589         <refsect1>
590                 <title>Signals</title>
591
592                 <variablelist>
593                         <varlistentry>
594                                 <term>SIGTERM</term>
595
596                                 <listitem><para>Upon receiving this
597                                 signal the systemd system manager
598                                 serializes its state, reexecutes
599                                 itself and deserializes the saved
600                                 state again. This is mostly equivalent
601                                 to <command>systemctl
602                                 daemon-reexec</command>.</para>
603
604                                 <para>systemd user managers will
605                                 start the
606                                 <filename>exit.target</filename> unit
607                                 when this signal is received. This is
608                                 mostly equivalent to
609                                 <command>systemctl --user start
610                                 exit.target</command>.</para></listitem>
611                         </varlistentry>
612
613                         <varlistentry>
614                                 <term>SIGINT</term>
615
616                                 <listitem><para>Upon receiving this
617                                 signal the systemd system manager will
618                                 start the
619                                 <filename>ctrl-alt-del.target</filename> unit. This
620                                 is mostly equivalent to
621                                 <command>systemctl start
622                                 ctl-alt-del.target</command>.</para>
623
624                                 <para>systemd user managers
625                                 treat this signal the same way as
626                                 SIGTERM.</para></listitem>
627                         </varlistentry>
628
629                         <varlistentry>
630                                 <term>SIGWINCH</term>
631
632                                 <listitem><para>When this signal is
633                                 received the systemd system manager
634                                 will start the
635                                 <filename>kbrequest.target</filename>
636                                 unit. This is mostly equivalent to
637                                 <command>systemctl start
638                                 kbrequest.target</command>.</para>
639
640                                 <para>This signal is ignored by
641                                 systemd user
642                                 managers.</para></listitem>
643                         </varlistentry>
644
645                         <varlistentry>
646                                 <term>SIGPWR</term>
647
648                                 <listitem><para>When this signal is
649                                 received the systemd manager
650                                 will start the
651                                 <filename>sigpwr.target</filename>
652                                 unit. This is mostly equivalent to
653                                 <command>systemctl start
654                                 sigpwr.target</command>.</para></listitem>
655                         </varlistentry>
656
657                         <varlistentry>
658                                 <term>SIGUSR1</term>
659
660                                 <listitem><para>When this signal is
661                                 received the systemd manager will try
662                                 to reconnect to the D-Bus
663                                 bus.</para></listitem>
664                         </varlistentry>
665
666                         <varlistentry>
667                                 <term>SIGUSR2</term>
668
669                                 <listitem><para>When this signal is
670                                 received the systemd manager will log
671                                 its complete state in human readable
672                                 form. The data logged is the same as
673                                 printed by <command>systemctl
674                                 dump</command>.</para></listitem>
675                         </varlistentry>
676
677                         <varlistentry>
678                                 <term>SIGHUP</term>
679
680                                 <listitem><para>Reloads the complete
681                                 daemon configuration. This is mostly
682                                 equivalent to <command>systemctl
683                                 daemon-reload</command>.</para></listitem>
684                         </varlistentry>
685
686                         <varlistentry>
687                                 <term>SIGRTMIN+0</term>
688
689                                 <listitem><para>Enters default mode, starts the
690                                 <filename>default.target</filename>
691                                 unit. This is mostly equivalent to
692                                 <command>systemctl start
693                                 default.target</command>.</para></listitem>
694                         </varlistentry>
695
696                         <varlistentry>
697                                 <term>SIGRTMIN+1</term>
698
699                                 <listitem><para>Enters rescue mode,
700                                 starts the
701                                 <filename>rescue.target</filename>
702                                 unit. This is mostly equivalent to
703                                 <command>systemctl isolate
704                                 rescue.target</command>.</para></listitem>
705                         </varlistentry>
706
707                         <varlistentry>
708                                 <term>SIGRTMIN+2</term>
709
710                                 <listitem><para>Enters emergency mode,
711                                 starts the
712                                 <filename>emergency.service</filename>
713                                 unit. This is mostly equivalent to
714                                 <command>systemctl isolate
715                                 emergency.service</command>.</para></listitem>
716                         </varlistentry>
717
718                         <varlistentry>
719                                 <term>SIGRTMIN+3</term>
720
721                                 <listitem><para>Halts the machine,
722                                 starts the
723                                 <filename>halt.target</filename>
724                                 unit. This is mostly equivalent to
725                                 <command>systemctl start
726                                 halt.target</command>.</para></listitem>
727                         </varlistentry>
728
729                         <varlistentry>
730                                 <term>SIGRTMIN+4</term>
731
732                                 <listitem><para>Powers off the machine,
733                                 starts the
734                                 <filename>poweroff.target</filename>
735                                 unit. This is mostly equivalent to
736                                 <command>systemctl start
737                                 poweroff.target</command>.</para></listitem>
738                         </varlistentry>
739
740                         <varlistentry>
741                                 <term>SIGRTMIN+5</term>
742
743                                 <listitem><para>Reboots the machine,
744                                 starts the
745                                 <filename>reboot.target</filename>
746                                 unit. This is mostly equivalent to
747                                 <command>systemctl start
748                                 reboot.target</command>.</para></listitem>
749                         </varlistentry>
750
751                         <varlistentry>
752                                 <term>SIGRTMIN+6</term>
753
754                                 <listitem><para>Reboots the machine via kexec,
755                                 starts the
756                                 <filename>kexec.target</filename>
757                                 unit. This is mostly equivalent to
758                                 <command>systemctl start
759                                 kexec.target</command>.</para></listitem>
760                         </varlistentry>
761
762                         <varlistentry>
763                                 <term>SIGRTMIN+13</term>
764
765                                 <listitem><para>Immediately halts the machine.</para></listitem>
766                         </varlistentry>
767
768                         <varlistentry>
769                                 <term>SIGRTMIN+14</term>
770
771                                 <listitem><para>Immediately powers off the machine.</para></listitem>
772                         </varlistentry>
773
774                         <varlistentry>
775                                 <term>SIGRTMIN+15</term>
776
777                                 <listitem><para>Immediately reboots the machine.</para></listitem>
778                         </varlistentry>
779
780                         <varlistentry>
781                                 <term>SIGRTMIN+16</term>
782
783                                 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
784                         </varlistentry>
785
786                         <varlistentry>
787                                 <term>SIGRTMIN+20</term>
788
789                                 <listitem><para>Enables display of
790                                 status messages on the console, as
791                                 controlled via
792                                 <varname>systemd.show_status=1</varname>
793                                 on the kernel command
794                                 line.</para></listitem>
795                         </varlistentry>
796
797                         <varlistentry>
798                                 <term>SIGRTMIN+21</term>
799
800                                 <listitem><para>Disables display of
801                                 status messages on the console, as
802                                 controlled via
803                                 <varname>systemd.show_status=0</varname>
804                                 on the kernel command
805                                 line.</para></listitem>
806                         </varlistentry>
807
808                         <varlistentry>
809                                 <term>SIGRTMIN+22</term>
810                                 <term>SIGRTMIN+23</term>
811
812                                 <listitem><para>Sets the log level to
813                                 <literal>debug</literal>
814                                 (resp. <literal>info</literal> on
815                                 <literal>SIGRTMIN+23</literal>), as
816                                 controlled via
817                                 <varname>systemd.log_level=debug</varname>
818                                 (resp. <varname>systemd.log_level=info</varname>
819                                 on <literal>SIGRTMIN+23</literal>) on
820                                 the kernel command
821                                 line.</para></listitem>
822                         </varlistentry>
823
824                         <varlistentry>
825                                 <term>SIGRTMIN+26</term>
826                                 <term>SIGRTMIN+27</term>
827                                 <term>SIGRTMIN+28</term>
828                                 <term>SIGRTMIN+29</term>
829
830                                 <listitem><para>Sets the log level to
831                                 <literal>journal-or-kmsg</literal>
832                                 (resp. <literal>console</literal> on
833                                 <literal>SIGRTMIN+27</literal>;
834                                 resp. <literal>kmsg</literal> on
835                                 <literal>SIGRTMIN+28</literal>;
836                                 resp. <literal>syslog-or-kmsg</literal>
837                                 on <literal>SIGRTMIN+29</literal>), as
838                                 controlled via
839                                 <varname>systemd.log_target=journal-or-kmsg</varname>
840                                 (resp. <varname>systemd.log_target=console</varname>
841                                 on <literal>SIGRTMIN+27</literal>;
842                                 resp. <varname>systemd.log_target=kmsg</varname>
843                                 on <literal>SIGRTMIN+28</literal>;
844                                 resp
845                                 <varname>systemd.log_target=syslog-or-kmsg</varname>
846                                 on <literal>SIGRTMIN+29</literal>) on
847                                 the kernel command
848                                 line.</para></listitem>
849                         </varlistentry>
850                 </variablelist>
851         </refsect1>
852
853         <refsect1>
854                 <title>Environment</title>
855
856                 <variablelist>
857                         <varlistentry>
858                                 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
859                                 <listitem><para>systemd reads the
860                                 log level from this environment
861                                 variable. This can be overridden with
862                                 <option>--log-level=</option>.</para></listitem>
863                         </varlistentry>
864
865                         <varlistentry>
866                                 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
867                                 <listitem><para>systemd reads the
868                                 log target from this environment
869                                 variable. This can be overridden with
870                                 <option>--log-target=</option>.</para></listitem>
871                         </varlistentry>
872
873                         <varlistentry>
874                                 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
875                                 <listitem><para>Controls whether
876                                 systemd highlights important log
877                                 messages. This can be overridden with
878                                 <option>--log-color=</option>.</para></listitem>
879                         </varlistentry>
880
881                         <varlistentry>
882                                 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
883                                 <listitem><para>Controls whether
884                                 systemd prints the code location along
885                                 with log messages. This can be
886                                 overridden with
887                                 <option>--log-location=</option>.</para></listitem>
888                         </varlistentry>
889
890                         <varlistentry>
891                                 <term><varname>$XDG_CONFIG_HOME</varname></term>
892                                 <term><varname>$XDG_CONFIG_DIRS</varname></term>
893                                 <term><varname>$XDG_DATA_HOME</varname></term>
894                                 <term><varname>$XDG_DATA_DIRS</varname></term>
895
896                                 <listitem><para>The systemd user
897                                 manager uses these variables in
898                                 accordance to the <ulink
899                                 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
900                                 Base Directory specification</ulink>
901                                 to find its configuration.</para></listitem>
902                         </varlistentry>
903
904                         <varlistentry>
905                                 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
906
907                                 <listitem><para>Controls where systemd
908                                 looks for unit
909                                 files.</para></listitem>
910                         </varlistentry>
911
912                         <varlistentry>
913                                 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
914
915                                 <listitem><para>Controls where systemd
916                                 looks for SysV init scripts.</para></listitem>
917                         </varlistentry>
918
919                         <varlistentry>
920                                 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
921
922                                 <listitem><para>Controls where systemd
923                                 looks for SysV init script runlevel link
924                                 farms.</para></listitem>
925                         </varlistentry>
926
927                         <varlistentry>
928                                 <term><varname>$LISTEN_PID</varname></term>
929                                 <term><varname>$LISTEN_FDS</varname></term>
930
931                                 <listitem><para>Set by systemd for
932                                 supervised processes during
933                                 socket-based activation. See
934                                 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
935                                 for more information.
936                                 </para></listitem>
937                         </varlistentry>
938
939                         <varlistentry>
940                                 <term><varname>$NOTIFY_SOCKET</varname></term>
941
942                                 <listitem><para>Set by systemd for
943                                 supervised processes for status and
944                                 start-up completion notification. See
945                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
946                                 for more information.
947                                 </para></listitem>
948                         </varlistentry>
949                 </variablelist>
950         </refsect1>
951
952         <refsect1>
953                 <title>Kernel Command Line</title>
954
955                 <para>When run as system instance systemd parses a
956                 number of kernel command line
957                 arguments<footnote><para>If run inside a Linux
958                 container these arguments may be passed as command
959                 line arguments to systemd itself, next to any of the
960                 command line options listed in the Options section
961                 above. If run outside of Linux containers, these
962                 arguments are parsed from
963                 <filename>/proc/cmdline</filename>
964                 instead.</para></footnote>:</para>
965
966                 <variablelist>
967                         <varlistentry>
968                                 <term><varname>systemd.unit=</varname></term>
969                                 <term><varname>rd.systemd.unit=</varname></term>
970
971                                 <listitem><para>Overrides the unit to
972                                 activate on boot. Defaults to
973                                 <filename>default.target</filename>. This
974                                 may be used to temporarily boot into a
975                                 different boot unit, for example
976                                 <filename>rescue.target</filename> or
977                                 <filename>emergency.service</filename>. See
978                                 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
979                                 for details about these units. The
980                                 option prefixed with
981                                 <literal>rd.</literal> is honoured
982                                 only in the initial RAM disk (initrd),
983                                 while the one that isn't prefixed only
984                                 in the main system.</para></listitem>
985                         </varlistentry>
986
987                         <varlistentry>
988                                 <term><varname>systemd.dump_core=</varname></term>
989
990                                 <listitem><para>Takes a boolean
991                                 argument. If <option>true</option>
992                                 systemd dumps core when it
993                                 crashes. Otherwise no core dump is
994                                 created. Defaults to
995                                 <option>true</option>.</para></listitem>
996                         </varlistentry>
997
998                         <varlistentry>
999                                 <term><varname>systemd.crash_shell=</varname></term>
1000
1001                                 <listitem><para>Takes a boolean
1002                                 argument. If <option>true</option>
1003                                 systemd spawns a shell when it
1004                                 crashes. Otherwise no shell is
1005                                 spawned. Defaults to
1006                                 <option>false</option>, for security
1007                                 reasons, as the shell is not protected
1008                                 by any password
1009                                 authentication.</para></listitem>
1010                         </varlistentry>
1011
1012                         <varlistentry>
1013                                 <term><varname>systemd.crash_chvt=</varname></term>
1014
1015                                 <listitem><para>Takes an integer
1016                                 argument. If positive systemd
1017                                 activates the specified virtual
1018                                 terminal when it crashes. Defaults to
1019                                 <literal>-1</literal>.</para></listitem>
1020                         </varlistentry>
1021
1022                         <varlistentry>
1023                                 <term><varname>systemd.confirm_spawn=</varname></term>
1024
1025                                 <listitem><para>Takes a boolean
1026                                 argument. If <option>true</option>
1027                                 asks for confirmation when spawning
1028                                 processes. Defaults to
1029                                 <option>false</option>.</para></listitem>
1030                         </varlistentry>
1031
1032                         <varlistentry>
1033                                 <term><varname>systemd.show_status=</varname></term>
1034
1035                                 <listitem><para>Takes a boolean
1036                                 argument. If <option>true</option>
1037                                 shows terse service status updates on
1038                                 the console during bootup. Defaults to
1039                                 <option>true</option>, unless
1040                                 <option>quiet</option> is passed as
1041                                 kernel command line option in which
1042                                 case it defaults to
1043                                 <option>false</option>.</para></listitem>
1044                         </varlistentry>
1045
1046                         <varlistentry>
1047                                 <term><varname>systemd.log_target=</varname></term>
1048                                 <term><varname>systemd.log_level=</varname></term>
1049                                 <term><varname>systemd.log_color=</varname></term>
1050                                 <term><varname>systemd.log_location=</varname></term>
1051
1052                                 <listitem><para>Controls log output,
1053                                 with the same effect as the
1054                                 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1055                                 environment variables described above.</para></listitem>
1056                         </varlistentry>
1057
1058                         <varlistentry>
1059                                 <term><varname>systemd.default_standard_output=</varname></term>
1060                                 <term><varname>systemd.default_standard_error=</varname></term>
1061                                 <listitem><para>Controls default
1062                                 standard output/error output for
1063                                 services, with the same effect as the
1064                                 <option>--default-standard-output=</option>
1065                                 resp. <option>--default-standard-error=</option>
1066                                 command line arguments described
1067                                 above.</para></listitem>
1068                         </varlistentry>
1069
1070                         <varlistentry>
1071                                 <term><varname>systemd.setenv=</varname></term>
1072
1073                                 <listitem><para>Takes a string
1074                                 argument in the form
1075                                 VARIABLE=VALUE. May be used to set
1076                                 environment variables for the init
1077                                 process and all its children at boot
1078                                 time. May be used more than once to
1079                                 set multiple variables. If the equal
1080                                 sign and variable are missing unsets
1081                                 an environment variable which might be
1082                                 passed in from the initial ram
1083                                 disk.</para></listitem>
1084                         </varlistentry>
1085
1086                         <varlistentry>
1087                                 <term><varname>quiet</varname></term>
1088
1089                                 <listitem><para>If passed turns off
1090                                 status output at boot, much like
1091                                 <varname>systemd.show_status=false</varname>
1092                                 would. Note that this option is also
1093                                 read by the kernel itself and disables
1094                                 kernel log output to the
1095                                 kernel. Passing this option hence
1096                                 turns off the usual output from both
1097                                 the system manager and the
1098                                 kernel.</para></listitem>
1099                         </varlistentry>
1100
1101                         <varlistentry>
1102                                 <term><varname>emergency</varname></term>
1103
1104                                 <listitem><para>Boot into emergency
1105                                 mode. This is equivalent to
1106                                 <varname>systemd.unit=emergency.target</varname>
1107                                 and provided for compatibility
1108                                 reasons and to be easier to type.</para></listitem>
1109                         </varlistentry>
1110
1111                         <varlistentry>
1112                                 <term><varname>single</varname></term>
1113                                 <term><varname>s</varname></term>
1114                                 <term><varname>S</varname></term>
1115                                 <term><varname>1</varname></term>
1116
1117                                 <listitem><para>Boot into rescue
1118                                 mode. This is equivalent to
1119                                 <varname>systemd.unit=rescue.target</varname>
1120                                 and provided for compatibility reasons
1121                                 and to be easier to
1122                                 type.</para></listitem>
1123                         </varlistentry>
1124
1125                         <varlistentry>
1126                                 <term><varname>2</varname></term>
1127                                 <term><varname>3</varname></term>
1128                                 <term><varname>4</varname></term>
1129                                 <term><varname>5</varname></term>
1130
1131                                 <listitem><para>Boot into the
1132                                 specified legacy SysV runlevel. This
1133                                 is equivalent to
1134                                 <varname>systemd.unit=runlevel2.target</varname>,
1135                                 <varname>systemd.unit=runlevel3.target</varname>,
1136                                 <varname>systemd.unit=runlevel4.target</varname>,
1137                                 resp. <varname>systemd.unit=runlevel5.target</varname>
1138                                 and provided for compatibility reasons
1139                                 and to be easier to
1140                                 type.</para></listitem>
1141                         </varlistentry>
1142
1143                         <varlistentry>
1144                                 <term><varname>locale.LANG=</varname></term>
1145                                 <term><varname>locale.LANGUAGE=</varname></term>
1146                                 <term><varname>locale.LC_CTYPE=</varname></term>
1147                                 <term><varname>locale.LC_NUMERIC=</varname></term>
1148                                 <term><varname>locale.LC_TIME=</varname></term>
1149                                 <term><varname>locale.LC_COLLATE=</varname></term>
1150                                 <term><varname>locale.LC_MONETARY=</varname></term>
1151                                 <term><varname>locale.LC_MESSAGES=</varname></term>
1152                                 <term><varname>locale.LC_PAPER=</varname></term>
1153                                 <term><varname>locale.LC_NAME=</varname></term>
1154                                 <term><varname>locale.LC_ADDRESS=</varname></term>
1155                                 <term><varname>locale.LC_TELEPHONE=</varname></term>
1156                                 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1157                                 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1158
1159                                 <listitem><para>Set the system locale
1160                                 to use. This overrides the settings in
1161                                 <filename>/etc/locale.conf</filename>. For
1162                                 more information see
1163                                 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1164                                 and
1165                                 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1166                                 </para></listitem>
1167                         </varlistentry>
1168                 </variablelist>
1169
1170                 <para>For other kernel command line parameters
1171                 understood by components of the core OS, please refer
1172                 to
1173                 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1174         </refsect1>
1175
1176         <refsect1>
1177                 <title>Sockets and FIFOs</title>
1178
1179                 <variablelist>
1180                         <varlistentry>
1181                                 <term><filename>/run/systemd/notify</filename></term>
1182
1183                                 <listitem><para>Daemon status
1184                                 notification socket. This is an
1185                                 AF_UNIX datagram socket and is used to
1186                                 implement the daemon notification
1187                                 logic as implemented by
1188                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1189
1190                         </varlistentry>
1191
1192                         <varlistentry>
1193                                 <term><filename>/run/systemd/shutdownd</filename></term>
1194
1195                                 <listitem><para>Used internally by the
1196                                 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1197                                 tool to implement delayed
1198                                 shutdowns. This is an AF_UNIX datagram
1199                                 socket.</para></listitem>
1200                         </varlistentry>
1201
1202                         <varlistentry>
1203                                 <term><filename>/run/systemd/private</filename></term>
1204
1205                                 <listitem><para>Used internally as
1206                                 communication channel between
1207                                 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1208                                 and the systemd process. This is an
1209                                 AF_UNIX stream socket. This interface
1210                                 is private to systemd and should not
1211                                 be used in external
1212                                 projects.</para></listitem>
1213                         </varlistentry>
1214
1215                         <varlistentry>
1216                                 <term><filename>/dev/initctl</filename></term>
1217
1218                                 <listitem><para>Limited compatibility
1219                                 support for the SysV client interface,
1220                                 as implemented by the
1221                                 <filename>systemd-initctl.service</filename>
1222                                 unit. This is a named pipe in the file
1223                                 system. This interface is obsolete and
1224                                 should not be used in new
1225                                 applications.</para></listitem>
1226                         </varlistentry>
1227                 </variablelist>
1228         </refsect1>
1229
1230         <refsect1>
1231                 <title>See Also</title>
1232                 <para>
1233                         <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1234                         <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1235                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1236                         <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1237                         <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1238                         <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1239                         <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1240                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1241                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1242                         <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1243                         <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1244                         <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1245                 </para>
1246         </refsect1>
1247
1248 </refentry>