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