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">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
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.
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.
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/>.
24 <refentry id="systemd">
27 <title>systemd</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd</refentrytitle>
42 <manvolnum>1</manvolnum>
46 <refname>systemd</refname>
47 <refname>init</refname>
48 <refpurpose>systemd system and service manager</refpurpose>
53 <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
56 <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
61 <title>Description</title>
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>
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>
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>
86 <title>Options</title>
88 <para>The following options are understood:</para>
92 <term><option>-h</option></term>
93 <term><option>--help</option></term>
95 <listitem><para>Prints a short help
96 text and exits.</para></listitem>
99 <term><option>--version</option></term>
101 <listitem><para>Prints a systemd version
102 identifier and exits.</para></listitem>
105 <term><option>--test</option></term>
107 <listitem><para>Determine startup
108 sequence, dump it and exit. This is an
109 option useful for debugging
110 only.</para></listitem>
113 <term><option>--dump-configuration-items</option></term>
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>
122 <term><option>--introspect=</option></term>
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
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>
136 <term><option>--unit=</option></term>
138 <listitem><para>Set default unit to
139 activate on startup. If not specified
141 <filename>default.target</filename>.</para></listitem>
144 <term><option>--system</option></term>
145 <term><option>--user</option></term>
147 <listitem><para>Tell systemd to run a
148 system instance (resp. user
149 instance), even if the process ID is
150 not 1 (resp. is 1), i.e. systemd is
151 not (resp. is) run as init process.
152 Normally it should not be necessary to
153 pass these options, as systemd
154 automatically detects the mode it is
155 started in. These options are hence of
156 little use except for debugging. Note
157 that it is not supported booting and
158 maintaining a full system with systemd
159 running in <option>--system</option>
160 mode, but PID not 1. In practice,
161 passing <option>--system</option> explicitly is
162 only useful in conjunction with
163 <option>--test</option>.</para></listitem>
166 <term><option>--dump-core</option></term>
168 <listitem><para>Dump core on
169 crash. This switch has no effect when
171 instance.</para></listitem>
174 <term><option>--crash-shell</option></term>
176 <listitem><para>Run shell on
177 crash. This switch has no effect when
179 instance.</para></listitem>
182 <term><option>--confirm-spawn</option></term>
184 <listitem><para>Ask for confirmation
185 when spawning processes. This switch
186 has no effect when run as user
187 instance.</para></listitem>
190 <term><option>--show-status=</option></term>
192 <listitem><para>Show terse service
193 status information while booting. This
194 switch has no effect when run as user
195 instance. Takes a boolean argument
196 which may be omitted which is
198 <option>true</option>.</para></listitem>
201 <term><option>--log-target=</option></term>
203 <listitem><para>Set log
204 target. Argument must be one of
205 <option>console</option>,
206 <option>journal</option>,
207 <option>syslog</option>,
208 <option>kmsg</option>,
209 <option>journal-or-kmsg</option>,
210 <option>syslog-or-kmsg</option>,
211 <option>null</option>.</para></listitem>
214 <term><option>--log-level=</option></term>
216 <listitem><para>Set log level. As
217 argument this accepts a numerical log
218 level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
219 symbolic names (lowercase):
220 <option>emerg</option>,
221 <option>alert</option>,
222 <option>crit</option>,
223 <option>err</option>,
224 <option>warning</option>,
225 <option>notice</option>,
226 <option>info</option>,
227 <option>debug</option>.</para></listitem>
230 <term><option>--log-color=</option></term>
232 <listitem><para>Highlight important
233 log messages. Argument is a boolean
234 value. If the argument is omitted it
236 <option>true</option>.</para></listitem>
239 <term><option>--log-location=</option></term>
241 <listitem><para>Include code location
242 in log messages. This is mostly
243 relevant for debugging
244 purposes. Argument is a boolean
245 value. If the argument is omitted
247 <option>true</option>.</para></listitem>
250 <term><option>--default-standard-output=</option></term>
251 <term><option>--default-standard-error=</option></term>
253 <listitem><para>Sets the default
254 output resp. error output for all
255 services and sockets, i.e. controls
257 <option>StandardOutput=</option>
258 resp. <option>StandardError=</option>
260 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
261 for details). Takes one of
262 <option>inherit</option>,
263 <option>null</option>,
264 <option>tty</option>,
265 <option>journal</option>,
266 <option>journal+console</option>,
267 <option>syslog</option>,
268 <option>syslog+console</option>,
269 <option>kmsg</option>,
270 <option>kmsg+console</option>. If the
272 <option>--default-standard-output=</option>
273 defaults to <option>journal</option>
275 <option>--default-standard-error=</option>
277 <option>inherit</option>.</para></listitem>
283 <title>Concepts</title>
285 <para>systemd provides a dependency system between
286 various entities called "units". Units encapsulate
287 various objects that are relevant for system boot-up
288 and maintenance. The majority of units are configured
289 in unit configuration files, whose syntax and basic
290 set of options is described in
291 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
292 however some are created automatically from other
293 configuration or dynamically from system state. Units
294 may be 'active' (meaning started, bound, plugged in,
295 ... depending on the unit type, see below), or
296 'inactive' (meaning stopped, unbound, unplugged, ...),
297 as well as in the process of being activated or
298 deactivated, i.e. between the two states (these states
299 are called 'activating', 'deactivating'). A special
300 'failed' state is available as well which is very
301 similar to 'inactive' and is entered when the service
302 failed in some way (process returned error code on
303 exit, or crashed, or an operation timed out). If this
304 state is entered the cause will be logged, for later
305 reference. Note that the various unit types may have a
306 number of additional substates, which are mapped to
307 the five generalized unit states described
310 <para>The following unit types are available:</para>
313 <listitem><para>Service units, which control
314 daemons and the processes they consist of. For
316 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
318 <listitem><para>Socket units, which
319 encapsulate local IPC or network sockets in
320 the system, useful for socket-based
321 activation. For details about socket units see
322 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
323 for details on socket-based activation and
324 other forms of activation, see
325 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
327 <listitem><para>Target units are useful to
328 group units, or provide well-known
329 synchronization points during boot-up, see
330 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
332 <listitem><para>Device units expose kernel
333 devices in systemd and may be used to
334 implement device-based activation. For details
336 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
338 <listitem><para>Mount units control mount
339 points in the file system, for details see
340 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
342 <listitem><para>Automount units provide
343 automount capabilities, for on-demand mounting
344 of file systems as well as parallelized
346 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
348 <listitem><para>Snapshot units can be used to
349 temporarily save the state of the set of
350 systemd units, which later may be restored by
351 activating the saved snapshot unit. For more
353 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
355 <listitem><para>Timer units are useful for
356 triggering activation of other units based on
357 timers. You may find details in
358 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
360 <listitem><para>Swap units are very similar to
361 mount units and encapsulate memory swap
362 partitions or files of the operating
363 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
365 <listitem><para>Path units may be used
366 to activate other services when file system
367 objects change or are modified. See
368 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
372 <para>Units are named as their configuration
373 files. Some units have special semantics. A detailed
375 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
377 <para>systemd knows various kinds of dependencies,
378 including positive and negative requirement
379 dependencies (i.e. <varname>Requires=</varname> and
380 <varname>Conflicts=</varname>) as well as ordering
381 dependencies (<varname>After=</varname> and
382 <varname>Before=</varname>). NB: ordering and
383 requirement dependencies are orthogonal. If only a
384 requirement dependency exists between two units
385 (e.g. <filename>foo.service</filename> requires
386 <filename>bar.service</filename>), but no ordering
387 dependency (e.g. <filename>foo.service</filename>
388 after <filename>bar.service</filename>) and both are
389 requested to start, they will be started in
390 parallel. It is a common pattern that both requirement
391 and ordering dependencies are placed between two
392 units. Also note that the majority of dependencies are
393 implicitly created and maintained by systemd. In most
394 cases it should be unnecessary to declare additional
395 dependencies manually, however it is possible to do
398 <para>Application programs and units (via
399 dependencies) may request state changes of units. In
400 systemd, these requests are encapsulated as 'jobs' and
401 maintained in a job queue. Jobs may succeed or can
402 fail, their execution is ordered based on the ordering
403 dependencies of the units they have been scheduled
406 <para>On boot systemd activates the target unit
407 <filename>default.target</filename> whose job is to
408 activate on-boot services and other on-boot units by
409 pulling them in via dependencies. Usually the unit
410 name is just an alias (symlink) for either
411 <filename>graphical.target</filename> (for
412 fully-featured boots into the UI) or
413 <filename>multi-user.target</filename> (for limited
414 console-only boots for use in embedded or server
415 environments, or similar; a subset of
416 graphical.target). However it is at the discretion of
417 the administrator to configure it as an alias to any
418 other target unit. See
419 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
420 for details about these target units.</para>
422 <para>Processes systemd spawns are placed in
423 individual Linux control groups named after the unit
424 which they belong to in the private systemd
425 hierarchy. (see <ulink
426 url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
427 for more information about control groups, or short
428 "cgroups"). systemd uses this to effectively keep
429 track of processes. Control group information is
430 maintained in the kernel, and is accessible via the
431 file system hierarchy (beneath
432 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
434 <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
435 (<command>ps xawf -eo pid,user,cgroup,args</command>
436 is particularly useful to list all processes and the
437 systemd units they belong to.).</para>
439 <para>systemd is compatible with the SysV init system
440 to a large degree: SysV init scripts are supported and
441 simply read as an alternative (though limited)
442 configuration file format. The SysV
443 <filename>/dev/initctl</filename> interface is
444 provided, and compatibility implementations of the
445 various SysV client tools are available. In addition to
446 that, various established Unix functionality such as
447 <filename>/etc/fstab</filename> or the
448 <filename>utmp</filename> database are
451 <para>systemd has a minimal transaction system: if a
452 unit is requested to start up or shut down it will add
453 it and all its dependencies to a temporary
454 transaction. Then, it will verify if the transaction
455 is consistent (i.e. whether the ordering of all units
456 is cycle-free). If it is not, systemd will try to fix
457 it up, and removes non-essential jobs from the
458 transaction that might remove the loop. Also, systemd
459 tries to suppress non-essential jobs in the
460 transaction that would stop a running service. Finally
461 it is checked whether the jobs of the transaction
462 contradict jobs that have already been queued, and
463 optionally the transaction is aborted then. If all
464 worked out and the transaction is consistent and
465 minimized in its impact it is merged with all already
466 outstanding jobs and added to the run
467 queue. Effectively this means that before executing a
468 requested operation, systemd will verify that it makes
469 sense, fixing it if possible, and only failing if it
470 really cannot work.</para>
472 <para>Systemd contains native implementations of
473 various tasks that need to be executed as part of the
474 boot process. For example, it sets the host name or
475 configures the loopback network device. It also sets
476 up and mounts various API file systems, such as
477 <filename>/sys</filename> or
478 <filename>/proc</filename>.</para>
480 <para>For more information about the concepts and
481 ideas behind systemd please refer to the <ulink
482 url="http://0pointer.de/blog/projects/systemd.html">Original
483 Design Document</ulink>.</para>
485 <para>Note that some but not all interfaces provided
486 by systemd are covered by the <ulink
487 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
488 Stability Promise</ulink>.</para>
490 <para>Units may be generated dynamically at boot and
491 system manager reload time, for example based on other
492 configuration files or parameters passed on the kernel
493 command line. For details see the <ulink
494 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
495 Specification</ulink>.</para>
497 <para>Systems which invoke systemd in a container
498 resp. initrd environment should implement the
500 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
501 Interface</ulink> resp. <ulink
502 url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd
503 Interface</ulink> specifications.</para>
507 <title>Directories</title>
511 <term>System unit directories</term>
513 <listitem><para>The systemd system
514 manager reads unit configuration from
515 various directories. Packages that
516 want to install unit files shall place
517 them in the directory returned by
518 <command>pkg-config systemd
519 --variable=systemdsystemunitdir</command>. Other
520 directories checked are
521 <filename>/usr/local/lib/systemd/system</filename>
523 <filename>/usr/lib/systemd/system</filename>. User
524 configuration always takes
525 precedence. <command>pkg-config
527 --variable=systemdsystemconfdir</command>
528 returns the path of the system
529 configuration directory. Packages
530 should alter the content of these
531 directories only with the
532 <command>enable</command> and
533 <command>disable</command> commands of
535 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
536 tool.</para></listitem>
542 <term>User unit directories</term>
544 <listitem><para>Similar rules apply
546 directories. However, here the <ulink
547 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
548 Base Directory specification</ulink>
550 units. Applications should place their
551 unit files in the directory returned
552 by <command>pkg-config systemd
553 --variable=systemduserunitdir</command>. Global
554 configuration is done in the directory
555 reported by <command>pkg-config
557 --variable=systemduserconfdir</command>. The
558 <command>enable</command> and
559 <command>disable</command> commands of
561 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
562 tool can handle both global (i.e. for
563 all users) and private (for one user)
564 enabling/disabling of
565 units.</para></listitem>
571 <term>SysV init scripts directory</term>
573 <listitem><para>The location of the
574 SysV init script directory varies
575 between distributions. If systemd
576 cannot find a native unit file for a
577 requested service, it will look for a
578 SysV init script of the same name
580 <filename>.service</filename> suffix
581 removed).</para></listitem>
587 <term>SysV runlevel link farm directory</term>
589 <listitem><para>The location of the
590 SysV runlevel link farm directory
591 varies between distributions. systemd
592 will take the link farm into account
593 when figuring out whether a service
594 shall be enabled. Note that a service
595 unit with a native unit configuration
596 file cannot be started by activating it
597 in the SysV runlevel link
598 farm.</para></listitem>
604 <title>Signals</title>
610 <listitem><para>Upon receiving this
611 signal the systemd system manager
612 serializes its state, reexecutes
613 itself and deserializes the saved
614 state again. This is mostly equivalent
615 to <command>systemctl
616 daemon-reexec</command>.</para>
618 <para>systemd user managers will
620 <filename>exit.target</filename> unit
621 when this signal is received. This is
623 <command>systemctl --user start
624 exit.target</command>.</para></listitem>
630 <listitem><para>Upon receiving this
631 signal the systemd system manager will
633 <filename>ctrl-alt-del.target</filename> unit. This
634 is mostly equivalent to
635 <command>systemctl start
636 ctl-alt-del.target</command>.</para>
638 <para>systemd user managers
639 treat this signal the same way as
640 SIGTERM.</para></listitem>
644 <term>SIGWINCH</term>
646 <listitem><para>When this signal is
647 received the systemd system manager
649 <filename>kbrequest.target</filename>
650 unit. This is mostly equivalent to
651 <command>systemctl start
652 kbrequest.target</command>.</para>
654 <para>This signal is ignored by
656 managers.</para></listitem>
662 <listitem><para>When this signal is
663 received the systemd manager
665 <filename>sigpwr.target</filename>
666 unit. This is mostly equivalent to
667 <command>systemctl start
668 sigpwr.target</command>.</para></listitem>
674 <listitem><para>When this signal is
675 received the systemd manager will try
676 to reconnect to the D-Bus
677 bus.</para></listitem>
683 <listitem><para>When this signal is
684 received the systemd manager will log
685 its complete state in human readable
686 form. The data logged is the same as
687 printed by <command>systemctl
688 dump</command>.</para></listitem>
694 <listitem><para>Reloads the complete
695 daemon configuration. This is mostly
696 equivalent to <command>systemctl
697 daemon-reload</command>.</para></listitem>
701 <term>SIGRTMIN+0</term>
703 <listitem><para>Enters default mode, starts the
704 <filename>default.target</filename>
705 unit. This is mostly equivalent to
706 <command>systemctl start
707 default.target</command>.</para></listitem>
711 <term>SIGRTMIN+1</term>
713 <listitem><para>Enters rescue mode,
715 <filename>rescue.target</filename>
716 unit. This is mostly equivalent to
717 <command>systemctl isolate
718 rescue.target</command>.</para></listitem>
722 <term>SIGRTMIN+2</term>
724 <listitem><para>Enters emergency mode,
726 <filename>emergency.service</filename>
727 unit. This is mostly equivalent to
728 <command>systemctl isolate
729 emergency.service</command>.</para></listitem>
733 <term>SIGRTMIN+3</term>
735 <listitem><para>Halts the machine,
737 <filename>halt.target</filename>
738 unit. This is mostly equivalent to
739 <command>systemctl start
740 halt.target</command>.</para></listitem>
744 <term>SIGRTMIN+4</term>
746 <listitem><para>Powers off the machine,
748 <filename>poweroff.target</filename>
749 unit. This is mostly equivalent to
750 <command>systemctl start
751 poweroff.target</command>.</para></listitem>
755 <term>SIGRTMIN+5</term>
757 <listitem><para>Reboots the machine,
759 <filename>reboot.target</filename>
760 unit. This is mostly equivalent to
761 <command>systemctl start
762 reboot.target</command>.</para></listitem>
766 <term>SIGRTMIN+6</term>
768 <listitem><para>Reboots the machine via kexec,
770 <filename>kexec.target</filename>
771 unit. This is mostly equivalent to
772 <command>systemctl start
773 kexec.target</command>.</para></listitem>
777 <term>SIGRTMIN+13</term>
779 <listitem><para>Immediately halts the machine.</para></listitem>
783 <term>SIGRTMIN+14</term>
785 <listitem><para>Immediately powers off the machine.</para></listitem>
789 <term>SIGRTMIN+15</term>
791 <listitem><para>Immediately reboots the machine.</para></listitem>
795 <term>SIGRTMIN+16</term>
797 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
801 <term>SIGRTMIN+20</term>
803 <listitem><para>Enables display of
804 status messages on the console, as
806 <varname>systemd.show_status=1</varname>
807 on the kernel command
808 line.</para></listitem>
812 <term>SIGRTMIN+21</term>
814 <listitem><para>Disables display of
815 status messages on the console, as
817 <varname>systemd.show_status=0</varname>
818 on the kernel command
819 line.</para></listitem>
823 <term>SIGRTMIN+22</term>
824 <term>SIGRTMIN+23</term>
826 <listitem><para>Sets the log level to
827 <literal>debug</literal>
828 (resp. <literal>info</literal> on
829 <literal>SIGRTMIN+23</literal>), as
831 <varname>systemd.log_level=debug</varname>
832 (resp. <varname>systemd.log_level=info</varname>
833 on <literal>SIGRTMIN+23</literal>) on
835 line.</para></listitem>
839 <term>SIGRTMIN+26</term>
840 <term>SIGRTMIN+27</term>
841 <term>SIGRTMIN+28</term>
842 <term>SIGRTMIN+29</term>
844 <listitem><para>Sets the log level to
845 <literal>journal-or-kmsg</literal>
846 (resp. <literal>console</literal> on
847 <literal>SIGRTMIN+27</literal>;
848 resp. <literal>kmsg</literal> on
849 <literal>SIGRTMIN+28</literal>;
850 resp. <literal>syslog-or-kmsg</literal>
851 on <literal>SIGRTMIN+29</literal>), as
853 <varname>systemd.log_target=journal-or-kmsg</varname>
854 (resp. <varname>systemd.log_target=console</varname>
855 on <literal>SIGRTMIN+27</literal>;
856 resp. <varname>systemd.log_target=kmsg</varname>
857 on <literal>SIGRTMIN+28</literal>;
859 <varname>systemd.log_target=syslog-or-kmsg</varname>
860 on <literal>SIGRTMIN+29</literal>) on
862 line.</para></listitem>
868 <title>Environment</title>
872 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
873 <listitem><para>systemd reads the
874 log level from this environment
875 variable. This can be overridden with
876 <option>--log-level=</option>.</para></listitem>
880 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
881 <listitem><para>systemd reads the
882 log target from this environment
883 variable. This can be overridden with
884 <option>--log-target=</option>.</para></listitem>
888 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
889 <listitem><para>Controls whether
890 systemd highlights important log
891 messages. This can be overridden with
892 <option>--log-color=</option>.</para></listitem>
896 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
897 <listitem><para>Controls whether
898 systemd prints the code location along
899 with log messages. This can be
901 <option>--log-location=</option>.</para></listitem>
905 <term><varname>$XDG_CONFIG_HOME</varname></term>
906 <term><varname>$XDG_CONFIG_DIRS</varname></term>
907 <term><varname>$XDG_DATA_HOME</varname></term>
908 <term><varname>$XDG_DATA_DIRS</varname></term>
910 <listitem><para>The systemd user
911 manager uses these variables in
912 accordance to the <ulink
913 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
914 Base Directory specification</ulink>
915 to find its configuration.</para></listitem>
919 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
921 <listitem><para>Controls where systemd
923 files.</para></listitem>
927 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
929 <listitem><para>Controls where systemd
930 looks for SysV init scripts.</para></listitem>
934 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
936 <listitem><para>Controls where systemd
937 looks for SysV init script runlevel link
938 farms.</para></listitem>
942 <term><varname>$LISTEN_PID</varname></term>
943 <term><varname>$LISTEN_FDS</varname></term>
945 <listitem><para>Set by systemd for
946 supervised processes during
947 socket-based activation. See
948 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
949 for more information.
954 <term><varname>$NOTIFY_SOCKET</varname></term>
956 <listitem><para>Set by systemd for
957 supervised processes for status and
958 start-up completion notification. See
959 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
960 for more information.
967 <title>Kernel Command Line</title>
969 <para>When run as system instance systemd parses a
970 number of kernel command line
971 arguments<footnote><para>If run inside a Linux
972 container these arguments may be passed as command
973 line arguments to systemd itself, next to any of the
974 command line options listed in the Options section
975 above. If run outside of Linux containers, these
976 arguments are parsed from
977 <filename>/proc/cmdline</filename>
978 instead.</para></footnote>:</para>
982 <term><varname>systemd.unit=</varname></term>
983 <term><varname>rd.systemd.unit=</varname></term>
985 <listitem><para>Overrides the unit to
986 activate on boot. Defaults to
987 <filename>default.target</filename>. This
988 may be used to temporarily boot into a
989 different boot unit, for example
990 <filename>rescue.target</filename> or
991 <filename>emergency.service</filename>. See
992 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
993 for details about these units. The
995 <literal>rd.</literal> is honoured
996 only in the initial RAM disk (initrd),
997 while the one that isn't prefixed only
998 in the main system.</para></listitem>
1002 <term><varname>systemd.dump_core=</varname></term>
1004 <listitem><para>Takes a boolean
1005 argument. If <option>true</option>
1006 systemd dumps core when it
1007 crashes. Otherwise no core dump is
1008 created. Defaults to
1009 <option>true</option>.</para></listitem>
1013 <term><varname>systemd.crash_shell=</varname></term>
1015 <listitem><para>Takes a boolean
1016 argument. If <option>true</option>
1017 systemd spawns a shell when it
1018 crashes. Otherwise no shell is
1019 spawned. Defaults to
1020 <option>false</option>, for security
1021 reasons, as the shell is not protected
1023 authentication.</para></listitem>
1027 <term><varname>systemd.crash_chvt=</varname></term>
1029 <listitem><para>Takes an integer
1030 argument. If positive systemd
1031 activates the specified virtual
1032 terminal when it crashes. Defaults to
1033 <literal>-1</literal>.</para></listitem>
1037 <term><varname>systemd.confirm_spawn=</varname></term>
1039 <listitem><para>Takes a boolean
1040 argument. If <option>true</option>
1041 asks for confirmation when spawning
1042 processes. Defaults to
1043 <option>false</option>.</para></listitem>
1047 <term><varname>systemd.show_status=</varname></term>
1049 <listitem><para>Takes a boolean
1050 argument. If <option>true</option>
1051 shows terse service status updates on
1052 the console during bootup. Defaults to
1053 <option>true</option>, unless
1054 <option>quiet</option> is passed as
1055 kernel command line option in which
1057 <option>false</option>.</para></listitem>
1061 <term><varname>systemd.log_target=</varname></term>
1062 <term><varname>systemd.log_level=</varname></term>
1063 <term><varname>systemd.log_color=</varname></term>
1064 <term><varname>systemd.log_location=</varname></term>
1066 <listitem><para>Controls log output,
1067 with the same effect as the
1068 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1069 environment variables described above.</para></listitem>
1073 <term><varname>systemd.default_standard_output=</varname></term>
1074 <term><varname>systemd.default_standard_error=</varname></term>
1075 <listitem><para>Controls default
1076 standard output/error output for
1077 services, with the same effect as the
1078 <option>--default-standard-output=</option>
1079 resp. <option>--default-standard-error=</option>
1080 command line arguments described
1081 above.</para></listitem>
1085 <term><varname>systemd.setenv=</varname></term>
1087 <listitem><para>Takes a string
1088 argument in the form
1089 VARIABLE=VALUE. May be used to set
1090 environment variables for the init
1091 process and all its children at boot
1092 time. May be used more than once to
1093 set multiple variables. If the equal
1094 sign and variable are missing unsets
1095 an environment variable which might be
1096 passed in from the initial ram
1097 disk.</para></listitem>
1101 <term><varname>quiet</varname></term>
1103 <listitem><para>If passed turns off
1104 status output at boot, much like
1105 <varname>systemd.show_status=false</varname>
1106 would. Note that this option is also
1107 read by the kernel itself and disables
1108 kernel log output to the
1109 kernel. Passing this option hence
1110 turns off the usual output from both
1111 the system manager and the
1112 kernel.</para></listitem>
1116 <term><varname>emergency</varname></term>
1118 <listitem><para>Boot into emergency
1119 mode. This is equivalent to
1120 <varname>systemd.unit=emergency.target</varname>
1121 and provided for compatibility
1122 reasons and to be easier to type.</para></listitem>
1126 <term><varname>single</varname></term>
1127 <term><varname>s</varname></term>
1128 <term><varname>S</varname></term>
1129 <term><varname>1</varname></term>
1131 <listitem><para>Boot into rescue
1132 mode. This is equivalent to
1133 <varname>systemd.unit=rescue.target</varname>
1134 and provided for compatibility reasons
1136 type.</para></listitem>
1140 <term><varname>2</varname></term>
1141 <term><varname>3</varname></term>
1142 <term><varname>4</varname></term>
1143 <term><varname>5</varname></term>
1145 <listitem><para>Boot into the
1146 specified legacy SysV runlevel. This
1148 <varname>systemd.unit=runlevel2.target</varname>,
1149 <varname>systemd.unit=runlevel3.target</varname>,
1150 <varname>systemd.unit=runlevel4.target</varname>,
1151 resp. <varname>systemd.unit=runlevel5.target</varname>
1152 and provided for compatibility reasons
1154 type.</para></listitem>
1158 <term><varname>locale.LANG=</varname></term>
1159 <term><varname>locale.LANGUAGE=</varname></term>
1160 <term><varname>locale.LC_CTYPE=</varname></term>
1161 <term><varname>locale.LC_NUMERIC=</varname></term>
1162 <term><varname>locale.LC_TIME=</varname></term>
1163 <term><varname>locale.LC_COLLATE=</varname></term>
1164 <term><varname>locale.LC_MONETARY=</varname></term>
1165 <term><varname>locale.LC_MESSAGES=</varname></term>
1166 <term><varname>locale.LC_PAPER=</varname></term>
1167 <term><varname>locale.LC_NAME=</varname></term>
1168 <term><varname>locale.LC_ADDRESS=</varname></term>
1169 <term><varname>locale.LC_TELEPHONE=</varname></term>
1170 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1171 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1173 <listitem><para>Set the system locale
1174 to use. This overrides the settings in
1175 <filename>/etc/locale.conf</filename>. For
1176 more information see
1177 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1179 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1184 <para>For other kernel command line parameters
1185 understood by components of the core OS, please refer
1187 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1191 <title>Sockets and FIFOs</title>
1195 <term><filename>/run/systemd/notify</filename></term>
1197 <listitem><para>Daemon status
1198 notification socket. This is an
1199 AF_UNIX datagram socket and is used to
1200 implement the daemon notification
1201 logic as implemented by
1202 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1207 <term><filename>/run/systemd/shutdownd</filename></term>
1209 <listitem><para>Used internally by the
1210 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1211 tool to implement delayed
1212 shutdowns. This is an AF_UNIX datagram
1213 socket.</para></listitem>
1217 <term><filename>/run/systemd/private</filename></term>
1219 <listitem><para>Used internally as
1220 communication channel between
1221 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1222 and the systemd process. This is an
1223 AF_UNIX stream socket. This interface
1224 is private to systemd and should not
1226 projects.</para></listitem>
1230 <term><filename>/dev/initctl</filename></term>
1232 <listitem><para>Limited compatibility
1233 support for the SysV client interface,
1234 as implemented by the
1235 <filename>systemd-initctl.service</filename>
1236 unit. This is a named pipe in the file
1237 system. This interface is obsolete and
1238 should not be used in new
1239 applications.</para></listitem>
1245 <title>See Also</title>
1247 <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1248 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1249 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1250 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1251 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1252 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1253 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1254 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1255 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1256 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1257 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1258 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>