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>--test</option></term>
101 <listitem><para>Determine startup
102 sequence, dump it and exit. This is an
103 option useful for debugging
104 only.</para></listitem>
107 <term><option>--dump-configuration-items</option></term>
109 <listitem><para>Dump understood unit
110 configuration items. This outputs a
111 terse but complete list of
112 configuration items understood in unit
113 definition files.</para></listitem>
116 <term><option>--introspect=</option></term>
118 <listitem><para>Extract D-Bus
119 interface introspection data. This is
120 mostly useful at install time
121 to generate data suitable for the
123 repository. Optionally the interface
124 name for the introspection data may be
125 specified. If omitted, the
126 introspection data for all interfaces
127 is dumped.</para></listitem>
130 <term><option>--unit=</option></term>
132 <listitem><para>Set default unit to
133 activate on startup. If not specified
135 <filename>default.target</filename>.</para></listitem>
138 <term><option>--system</option></term>
139 <term><option>--user</option></term>
141 <listitem><para>Tell systemd to run a
142 system instance (resp. user
143 instance), even if the process ID is
144 not 1 (resp. is 1), i.e. systemd is
145 not (resp. is) run as init process.
146 Normally it should not be necessary to
147 pass these options, as systemd
148 automatically detects the mode it is
149 started in. These options are hence of
150 little use except for debugging. Note
151 that it is not supported booting and
152 maintaining a full system with systemd
153 running in <option>--system</option>
154 mode, but PID not 1. In practice,
155 passing <option>--system</option> explicitly is
156 only useful in conjunction with
157 <option>--test</option>.</para></listitem>
160 <term><option>--dump-core</option></term>
162 <listitem><para>Dump core on
163 crash. This switch has no effect when
165 instance.</para></listitem>
168 <term><option>--crash-shell</option></term>
170 <listitem><para>Run shell on
171 crash. This switch has no effect when
173 instance.</para></listitem>
176 <term><option>--confirm-spawn</option></term>
178 <listitem><para>Ask for confirmation
179 when spawning processes. This switch
180 has no effect when run as user
181 instance.</para></listitem>
184 <term><option>--show-status=</option></term>
186 <listitem><para>Show terse service
187 status information while booting. This
188 switch has no effect when run as user
189 instance. Takes a boolean argument
190 which may be omitted which is
192 <option>true</option>.</para></listitem>
195 <term><option>--log-target=</option></term>
197 <listitem><para>Set log
198 target. Argument must be one of
199 <option>console</option>,
200 <option>journal</option>,
201 <option>syslog</option>,
202 <option>kmsg</option>,
203 <option>journal-or-kmsg</option>,
204 <option>syslog-or-kmsg</option>,
205 <option>null</option>.</para></listitem>
208 <term><option>--log-level=</option></term>
210 <listitem><para>Set log level. As
211 argument this accepts a numerical log
212 level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
213 symbolic names (lowercase):
214 <option>emerg</option>,
215 <option>alert</option>,
216 <option>crit</option>,
217 <option>err</option>,
218 <option>warning</option>,
219 <option>notice</option>,
220 <option>info</option>,
221 <option>debug</option>.</para></listitem>
224 <term><option>--log-color=</option></term>
226 <listitem><para>Highlight important
227 log messages. Argument is a boolean
228 value. If the argument is omitted it
230 <option>true</option>.</para></listitem>
233 <term><option>--log-location=</option></term>
235 <listitem><para>Include code location
236 in log messages. This is mostly
237 relevant for debugging
238 purposes. Argument is a boolean
239 value. If the argument is omitted
241 <option>true</option>.</para></listitem>
244 <term><option>--default-standard-output=</option></term>
245 <term><option>--default-standard-error=</option></term>
247 <listitem><para>Sets the default
248 output resp. error output for all
249 services and sockets, i.e. controls
251 <option>StandardOutput=</option>
252 resp. <option>StandardError=</option>
254 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
255 for details). Takes one of
256 <option>inherit</option>,
257 <option>null</option>,
258 <option>tty</option>,
259 <option>journal</option>,
260 <option>journal+console</option>,
261 <option>syslog</option>,
262 <option>syslog+console</option>,
263 <option>kmsg</option>,
264 <option>kmsg+console</option>. If the
266 <option>--default-standard-output=</option>
267 defaults to <option>journal</option>
269 <option>--default-standard-error=</option>
271 <option>inherit</option>.</para></listitem>
277 <title>Concepts</title>
279 <para>systemd provides a dependency system between
280 various entities called "units". Units encapsulate
281 various objects that are relevant for system boot-up
282 and maintenance. The majority of units are configured
283 in unit configuration files, whose syntax and basic
284 set of options is described in
285 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
286 however some are created automatically from other
287 configuration or dynamically from system state. Units
288 may be 'active' (meaning started, bound, plugged in,
289 ... depending on the unit type, see below), or
290 'inactive' (meaning stopped, unbound, unplugged, ...),
291 as well as in the process of being activated or
292 deactivated, i.e. between the two states (these states
293 are called 'activating', 'deactivating'). A special
294 'failed' state is available as well which is very
295 similar to 'inactive' and is entered when the service
296 failed in some way (process returned error code on
297 exit, or crashed, or an operation timed out). If this
298 state is entered the cause will be logged, for later
299 reference. Note that the various unit types may have a
300 number of additional substates, which are mapped to
301 the five generalized unit states described
304 <para>The following unit types are available:</para>
307 <listitem><para>Service units, which control
308 daemons and the processes they consist of. For
310 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
312 <listitem><para>Socket units, which
313 encapsulate local IPC or network sockets in
314 the system, useful for socket-based
315 activation. For details about socket units see
316 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
317 for details on socket-based activation and
318 other forms of activation, see
319 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
321 <listitem><para>Target units are useful to
322 group units, or provide well-known
323 synchronization points during boot-up, see
324 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
326 <listitem><para>Device units expose kernel
327 devices in systemd and may be used to
328 implement device-based activation. For details
330 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
332 <listitem><para>Mount units control mount
333 points in the file system, for details see
334 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
336 <listitem><para>Automount units provide
337 automount capabilities, for on-demand mounting
338 of file systems as well as parallelized
340 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
342 <listitem><para>Snapshot units can be used to
343 temporarily save the state of the set of
344 systemd units, which later may be restored by
345 activating the saved snapshot unit. For more
347 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
349 <listitem><para>Timer units are useful for
350 triggering activation of other units based on
351 timers. You may find details in
352 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
354 <listitem><para>Swap units are very similar to
355 mount units and encapsulate memory swap
356 partitions or files of the operating
357 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
359 <listitem><para>Path units may be used
360 to activate other services when file system
361 objects change or are modified. See
362 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
366 <para>Units are named as their configuration
367 files. Some units have special semantics. A detailed
369 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
371 <para>systemd knows various kinds of dependencies,
372 including positive and negative requirement
373 dependencies (i.e. <varname>Requires=</varname> and
374 <varname>Conflicts=</varname>) as well as ordering
375 dependencies (<varname>After=</varname> and
376 <varname>Before=</varname>). NB: ordering and
377 requirement dependencies are orthogonal. If only a
378 requirement dependency exists between two units
379 (e.g. <filename>foo.service</filename> requires
380 <filename>bar.service</filename>), but no ordering
381 dependency (e.g. <filename>foo.service</filename>
382 after <filename>bar.service</filename>) and both are
383 requested to start, they will be started in
384 parallel. It is a common pattern that both requirement
385 and ordering dependencies are placed between two
386 units. Also note that the majority of dependencies are
387 implicitly created and maintained by systemd. In most
388 cases it should be unnecessary to declare additional
389 dependencies manually, however it is possible to do
392 <para>Application programs and units (via
393 dependencies) may request state changes of units. In
394 systemd, these requests are encapsulated as 'jobs' and
395 maintained in a job queue. Jobs may succeed or can
396 fail, their execution is ordered based on the ordering
397 dependencies of the units they have been scheduled
400 <para>On boot systemd activates the target unit
401 <filename>default.target</filename> whose job is to
402 activate on-boot services and other on-boot units by
403 pulling them in via dependencies. Usually the unit
404 name is just an alias (symlink) for either
405 <filename>graphical.target</filename> (for
406 fully-featured boots into the UI) or
407 <filename>multi-user.target</filename> (for limited
408 console-only boots for use in embedded or server
409 environments, or similar; a subset of
410 graphical.target). However it is at the discretion of
411 the administrator to configure it as an alias to any
412 other target unit. See
413 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
414 for details about these target units.</para>
416 <para>Processes systemd spawns are placed in
417 individual Linux control groups named after the unit
418 which they belong to in the private systemd
419 hierarchy. (see <ulink
420 url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
421 for more information about control groups, or short
422 "cgroups"). systemd uses this to effectively keep
423 track of processes. Control group information is
424 maintained in the kernel, and is accessible via the
425 file system hierarchy (beneath
426 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
428 <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
429 (<command>ps xawf -eo pid,user,cgroup,args</command>
430 is particularly useful to list all processes and the
431 systemd units they belong to.).</para>
433 <para>systemd is compatible with the SysV init system
434 to a large degree: SysV init scripts are supported and
435 simply read as an alternative (though limited)
436 configuration file format. The SysV
437 <filename>/dev/initctl</filename> interface is
438 provided, and compatibility implementations of the
439 various SysV client tools are available. In addition to
440 that, various established Unix functionality such as
441 <filename>/etc/fstab</filename> or the
442 <filename>utmp</filename> database are
445 <para>systemd has a minimal transaction system: if a
446 unit is requested to start up or shut down it will add
447 it and all its dependencies to a temporary
448 transaction. Then, it will verify if the transaction
449 is consistent (i.e. whether the ordering of all units
450 is cycle-free). If it is not, systemd will try to fix
451 it up, and removes non-essential jobs from the
452 transaction that might remove the loop. Also, systemd
453 tries to suppress non-essential jobs in the
454 transaction that would stop a running service. Finally
455 it is checked whether the jobs of the transaction
456 contradict jobs that have already been queued, and
457 optionally the transaction is aborted then. If all
458 worked out and the transaction is consistent and
459 minimized in its impact it is merged with all already
460 outstanding jobs and added to the run
461 queue. Effectively this means that before executing a
462 requested operation, systemd will verify that it makes
463 sense, fixing it if possible, and only failing if it
464 really cannot work.</para>
466 <para>Systemd contains native implementations of
467 various tasks that need to be executed as part of the
468 boot process. For example, it sets the host name or
469 configures the loopback network device. It also sets
470 up and mounts various API file systems, such as
471 <filename>/sys</filename> or
472 <filename>/proc</filename>.</para>
474 <para>For more information about the concepts and
475 ideas behind systemd please refer to the <ulink
476 url="http://0pointer.de/blog/projects/systemd.html">Original
477 Design Document</ulink>.</para>
479 <para>Note that some but not all interfaces provided
480 by systemd are covered by the <ulink
481 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
482 Stability Promise</ulink>.</para>
484 <para>Units may be generated dynamically at boot and
485 system manager reload time, for example based on other
486 configuration files or parameters passed on the kernel
487 command line. For details see the <ulink
488 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
489 Specification</ulink>.</para>
493 <title>Directories</title>
497 <term>System unit directories</term>
499 <listitem><para>The systemd system
500 manager reads unit configuration from
501 various directories. Packages that
502 want to install unit files shall place
503 them in the directory returned by
504 <command>pkg-config systemd
505 --variable=systemdsystemunitdir</command>. Other
506 directories checked are
507 <filename>/usr/local/lib/systemd/system</filename>
509 <filename>/usr/lib/systemd/system</filename>. User
510 configuration always takes
511 precedence. <command>pkg-config
513 --variable=systemdsystemconfdir</command>
514 returns the path of the system
515 configuration directory. Packages
516 should alter the content of these
517 directories only with the
518 <command>enable</command> and
519 <command>disable</command> commands of
521 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
522 tool.</para></listitem>
528 <term>User unit directories</term>
530 <listitem><para>Similar rules apply
532 directories. However, here the <ulink
533 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
534 Base Directory specification</ulink>
536 units. Applications should place their
537 unit files in the directory returned
538 by <command>pkg-config systemd
539 --variable=systemduserunitdir</command>. Global
540 configuration is done in the directory
541 reported by <command>pkg-config
543 --variable=systemduserconfdir</command>. The
544 <command>enable</command> and
545 <command>disable</command> commands of
547 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
548 tool can handle both global (i.e. for
549 all users) and private (for one user)
550 enabling/disabling of
551 units.</para></listitem>
557 <term>SysV init scripts directory</term>
559 <listitem><para>The location of the
560 SysV init script directory varies
561 between distributions. If systemd
562 cannot find a native unit file for a
563 requested service, it will look for a
564 SysV init script of the same name
566 <filename>.service</filename> suffix
567 removed).</para></listitem>
573 <term>SysV runlevel link farm directory</term>
575 <listitem><para>The location of the
576 SysV runlevel link farm directory
577 varies between distributions. systemd
578 will take the link farm into account
579 when figuring out whether a service
580 shall be enabled. Note that a service
581 unit with a native unit configuration
582 file cannot be started by activating it
583 in the SysV runlevel link
584 farm.</para></listitem>
590 <title>Signals</title>
596 <listitem><para>Upon receiving this
597 signal the systemd system manager
598 serializes its state, reexecutes
599 itself and deserializes the saved
600 state again. This is mostly equivalent
601 to <command>systemctl
602 daemon-reexec</command>.</para>
604 <para>systemd user managers will
606 <filename>exit.target</filename> unit
607 when this signal is received. This is
609 <command>systemctl --user start
610 exit.target</command>.</para></listitem>
616 <listitem><para>Upon receiving this
617 signal the systemd system manager will
619 <filename>ctrl-alt-del.target</filename> unit. This
620 is mostly equivalent to
621 <command>systemctl start
622 ctl-alt-del.target</command>.</para>
624 <para>systemd user managers
625 treat this signal the same way as
626 SIGTERM.</para></listitem>
630 <term>SIGWINCH</term>
632 <listitem><para>When this signal is
633 received the systemd system manager
635 <filename>kbrequest.target</filename>
636 unit. This is mostly equivalent to
637 <command>systemctl start
638 kbrequest.target</command>.</para>
640 <para>This signal is ignored by
642 managers.</para></listitem>
648 <listitem><para>When this signal is
649 received the systemd manager
651 <filename>sigpwr.target</filename>
652 unit. This is mostly equivalent to
653 <command>systemctl start
654 sigpwr.target</command>.</para></listitem>
660 <listitem><para>When this signal is
661 received the systemd manager will try
662 to reconnect to the D-Bus
663 bus.</para></listitem>
669 <listitem><para>When this signal is
670 received the systemd manager will log
671 its complete state in human readable
672 form. The data logged is the same as
673 printed by <command>systemctl
674 dump</command>.</para></listitem>
680 <listitem><para>Reloads the complete
681 daemon configuration. This is mostly
682 equivalent to <command>systemctl
683 daemon-reload</command>.</para></listitem>
687 <term>SIGRTMIN+0</term>
689 <listitem><para>Enters default mode, starts the
690 <filename>default.target</filename>
691 unit. This is mostly equivalent to
692 <command>systemctl start
693 default.target</command>.</para></listitem>
697 <term>SIGRTMIN+1</term>
699 <listitem><para>Enters rescue mode,
701 <filename>rescue.target</filename>
702 unit. This is mostly equivalent to
703 <command>systemctl isolate
704 rescue.target</command>.</para></listitem>
708 <term>SIGRTMIN+2</term>
710 <listitem><para>Enters emergency mode,
712 <filename>emergency.service</filename>
713 unit. This is mostly equivalent to
714 <command>systemctl isolate
715 emergency.service</command>.</para></listitem>
719 <term>SIGRTMIN+3</term>
721 <listitem><para>Halts the machine,
723 <filename>halt.target</filename>
724 unit. This is mostly equivalent to
725 <command>systemctl start
726 halt.target</command>.</para></listitem>
730 <term>SIGRTMIN+4</term>
732 <listitem><para>Powers off the machine,
734 <filename>poweroff.target</filename>
735 unit. This is mostly equivalent to
736 <command>systemctl start
737 poweroff.target</command>.</para></listitem>
741 <term>SIGRTMIN+5</term>
743 <listitem><para>Reboots the machine,
745 <filename>reboot.target</filename>
746 unit. This is mostly equivalent to
747 <command>systemctl start
748 reboot.target</command>.</para></listitem>
752 <term>SIGRTMIN+6</term>
754 <listitem><para>Reboots the machine via kexec,
756 <filename>kexec.target</filename>
757 unit. This is mostly equivalent to
758 <command>systemctl start
759 kexec.target</command>.</para></listitem>
763 <term>SIGRTMIN+13</term>
765 <listitem><para>Immediately halts the machine.</para></listitem>
769 <term>SIGRTMIN+14</term>
771 <listitem><para>Immediately powers off the machine.</para></listitem>
775 <term>SIGRTMIN+15</term>
777 <listitem><para>Immediately reboots the machine.</para></listitem>
781 <term>SIGRTMIN+16</term>
783 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
787 <term>SIGRTMIN+20</term>
789 <listitem><para>Enables display of
790 status messages on the console, as
792 <varname>systemd.show_status=1</varname>
793 on the kernel command
794 line.</para></listitem>
798 <term>SIGRTMIN+21</term>
800 <listitem><para>Disables display of
801 status messages on the console, as
803 <varname>systemd.show_status=0</varname>
804 on the kernel command
805 line.</para></listitem>
809 <term>SIGRTMIN+22</term>
810 <term>SIGRTMIN+23</term>
812 <listitem><para>Sets the log level to
813 <literal>debug</literal>
814 (resp. <literal>info</literal> on
815 <literal>SIGRTMIN+23</literal>), as
817 <varname>systemd.log_level=debug</varname>
818 (resp. <varname>systemd.log_level=info</varname>
819 on <literal>SIGRTMIN+23</literal>) on
821 line.</para></listitem>
825 <term>SIGRTMIN+26</term>
826 <term>SIGRTMIN+27</term>
827 <term>SIGRTMIN+28</term>
828 <term>SIGRTMIN+29</term>
830 <listitem><para>Sets the log level to
831 <literal>journal-or-kmsg</literal>
832 (resp. <literal>console</literal> on
833 <literal>SIGRTMIN+27</literal>;
834 resp. <literal>kmsg</literal> on
835 <literal>SIGRTMIN+28</literal>;
836 resp. <literal>syslog-or-kmsg</literal>
837 on <literal>SIGRTMIN+29</literal>), as
839 <varname>systemd.log_target=journal-or-kmsg</varname>
840 (resp. <varname>systemd.log_target=console</varname>
841 on <literal>SIGRTMIN+27</literal>;
842 resp. <varname>systemd.log_target=kmsg</varname>
843 on <literal>SIGRTMIN+28</literal>;
845 <varname>systemd.log_target=syslog-or-kmsg</varname>
846 on <literal>SIGRTMIN+29</literal>) on
848 line.</para></listitem>
854 <title>Environment</title>
858 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
859 <listitem><para>systemd reads the
860 log level from this environment
861 variable. This can be overridden with
862 <option>--log-level=</option>.</para></listitem>
866 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
867 <listitem><para>systemd reads the
868 log target from this environment
869 variable. This can be overridden with
870 <option>--log-target=</option>.</para></listitem>
874 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
875 <listitem><para>Controls whether
876 systemd highlights important log
877 messages. This can be overridden with
878 <option>--log-color=</option>.</para></listitem>
882 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
883 <listitem><para>Controls whether
884 systemd prints the code location along
885 with log messages. This can be
887 <option>--log-location=</option>.</para></listitem>
891 <term><varname>$XDG_CONFIG_HOME</varname></term>
892 <term><varname>$XDG_CONFIG_DIRS</varname></term>
893 <term><varname>$XDG_DATA_HOME</varname></term>
894 <term><varname>$XDG_DATA_DIRS</varname></term>
896 <listitem><para>The systemd user
897 manager uses these variables in
898 accordance to the <ulink
899 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
900 Base Directory specification</ulink>
901 to find its configuration.</para></listitem>
905 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
907 <listitem><para>Controls where systemd
909 files.</para></listitem>
913 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
915 <listitem><para>Controls where systemd
916 looks for SysV init scripts.</para></listitem>
920 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
922 <listitem><para>Controls where systemd
923 looks for SysV init script runlevel link
924 farms.</para></listitem>
928 <term><varname>$LISTEN_PID</varname></term>
929 <term><varname>$LISTEN_FDS</varname></term>
931 <listitem><para>Set by systemd for
932 supervised processes during
933 socket-based activation. See
934 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
935 for more information.
940 <term><varname>$NOTIFY_SOCKET</varname></term>
942 <listitem><para>Set by systemd for
943 supervised processes for status and
944 start-up completion notification. See
945 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
946 for more information.
953 <title>Kernel Command Line</title>
955 <para>When run as system instance systemd parses a
956 number of kernel command line
957 arguments<footnote><para>If run inside a Linux
958 container these arguments may be passed as command
959 line arguments to systemd itself, next to any of the
960 command line options listed in the Options section
961 above. If run outside of Linux containers, these
962 arguments are parsed from
963 <filename>/proc/cmdline</filename>
964 instead.</para></footnote>:</para>
968 <term><varname>systemd.unit=</varname></term>
969 <term><varname>rd.systemd.unit=</varname></term>
971 <listitem><para>Overrides the unit to
972 activate on boot. Defaults to
973 <filename>default.target</filename>. This
974 may be used to temporarily boot into a
975 different boot unit, for example
976 <filename>rescue.target</filename> or
977 <filename>emergency.service</filename>. See
978 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
979 for details about these units. The
981 <literal>rd.</literal> is honoured
982 only in the initial RAM disk (initrd),
983 while the one that isn't prefixed only
984 in the main system.</para></listitem>
988 <term><varname>systemd.dump_core=</varname></term>
990 <listitem><para>Takes a boolean
991 argument. If <option>true</option>
992 systemd dumps core when it
993 crashes. Otherwise no core dump is
995 <option>true</option>.</para></listitem>
999 <term><varname>systemd.crash_shell=</varname></term>
1001 <listitem><para>Takes a boolean
1002 argument. If <option>true</option>
1003 systemd spawns a shell when it
1004 crashes. Otherwise no shell is
1005 spawned. Defaults to
1006 <option>false</option>, for security
1007 reasons, as the shell is not protected
1009 authentication.</para></listitem>
1013 <term><varname>systemd.crash_chvt=</varname></term>
1015 <listitem><para>Takes an integer
1016 argument. If positive systemd
1017 activates the specified virtual
1018 terminal when it crashes. Defaults to
1019 <literal>-1</literal>.</para></listitem>
1023 <term><varname>systemd.confirm_spawn=</varname></term>
1025 <listitem><para>Takes a boolean
1026 argument. If <option>true</option>
1027 asks for confirmation when spawning
1028 processes. Defaults to
1029 <option>false</option>.</para></listitem>
1033 <term><varname>systemd.show_status=</varname></term>
1035 <listitem><para>Takes a boolean
1036 argument. If <option>true</option>
1037 shows terse service status updates on
1038 the console during bootup. Defaults to
1039 <option>true</option>, unless
1040 <option>quiet</option> is passed as
1041 kernel command line option in which
1043 <option>false</option>.</para></listitem>
1047 <term><varname>systemd.log_target=</varname></term>
1048 <term><varname>systemd.log_level=</varname></term>
1049 <term><varname>systemd.log_color=</varname></term>
1050 <term><varname>systemd.log_location=</varname></term>
1052 <listitem><para>Controls log output,
1053 with the same effect as the
1054 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1055 environment variables described above.</para></listitem>
1059 <term><varname>systemd.default_standard_output=</varname></term>
1060 <term><varname>systemd.default_standard_error=</varname></term>
1061 <listitem><para>Controls default
1062 standard output/error output for
1063 services, with the same effect as the
1064 <option>--default-standard-output=</option>
1065 resp. <option>--default-standard-error=</option>
1066 command line arguments described
1067 above.</para></listitem>
1071 <term><varname>systemd.setenv=</varname></term>
1073 <listitem><para>Takes a string
1074 argument in the form
1075 VARIABLE=VALUE. May be used to set
1076 environment variables for the init
1077 process and all its children at boot
1078 time. May be used more than once to
1079 set multiple variables. If the equal
1080 sign and variable are missing unsets
1081 an environment variable which might be
1082 passed in from the initial ram
1083 disk.</para></listitem>
1087 <term><varname>quiet</varname></term>
1089 <listitem><para>If passed turns off
1090 status output at boot, much like
1091 <varname>systemd.show_status=false</varname>
1092 would. Note that this option is also
1093 read by the kernel itself and disables
1094 kernel log output to the
1095 kernel. Passing this option hence
1096 turns off the usual output from both
1097 the system manager and the
1098 kernel.</para></listitem>
1102 <term><varname>emergency</varname></term>
1104 <listitem><para>Boot into emergency
1105 mode. This is equivalent to
1106 <varname>systemd.unit=emergency.target</varname>
1107 and provided for compatibility
1108 reasons and to be easier to type.</para></listitem>
1112 <term><varname>single</varname></term>
1113 <term><varname>s</varname></term>
1114 <term><varname>S</varname></term>
1115 <term><varname>1</varname></term>
1117 <listitem><para>Boot into rescue
1118 mode. This is equivalent to
1119 <varname>systemd.unit=rescue.target</varname>
1120 and provided for compatibility reasons
1122 type.</para></listitem>
1126 <term><varname>2</varname></term>
1127 <term><varname>3</varname></term>
1128 <term><varname>4</varname></term>
1129 <term><varname>5</varname></term>
1131 <listitem><para>Boot into the
1132 specified legacy SysV runlevel. This
1134 <varname>systemd.unit=runlevel2.target</varname>,
1135 <varname>systemd.unit=runlevel3.target</varname>,
1136 <varname>systemd.unit=runlevel4.target</varname>,
1137 resp. <varname>systemd.unit=runlevel5.target</varname>
1138 and provided for compatibility reasons
1140 type.</para></listitem>
1144 <term><varname>locale.LANG=</varname></term>
1145 <term><varname>locale.LANGUAGE=</varname></term>
1146 <term><varname>locale.LC_CTYPE=</varname></term>
1147 <term><varname>locale.LC_NUMERIC=</varname></term>
1148 <term><varname>locale.LC_TIME=</varname></term>
1149 <term><varname>locale.LC_COLLATE=</varname></term>
1150 <term><varname>locale.LC_MONETARY=</varname></term>
1151 <term><varname>locale.LC_MESSAGES=</varname></term>
1152 <term><varname>locale.LC_PAPER=</varname></term>
1153 <term><varname>locale.LC_NAME=</varname></term>
1154 <term><varname>locale.LC_ADDRESS=</varname></term>
1155 <term><varname>locale.LC_TELEPHONE=</varname></term>
1156 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1157 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1159 <listitem><para>Set the system locale
1160 to use. This overrides the settings in
1161 <filename>/etc/locale.conf</filename>. For
1162 more information see
1163 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1165 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1170 <para>For other kernel command line parameters
1171 understood by components of the core OS, please refer
1173 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1177 <title>Sockets and FIFOs</title>
1181 <term><filename>/run/systemd/notify</filename></term>
1183 <listitem><para>Daemon status
1184 notification socket. This is an
1185 AF_UNIX datagram socket and is used to
1186 implement the daemon notification
1187 logic as implemented by
1188 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1193 <term><filename>/run/systemd/shutdownd</filename></term>
1195 <listitem><para>Used internally by the
1196 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1197 tool to implement delayed
1198 shutdowns. This is an AF_UNIX datagram
1199 socket.</para></listitem>
1203 <term><filename>/run/systemd/private</filename></term>
1205 <listitem><para>Used internally as
1206 communication channel between
1207 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1208 and the systemd process. This is an
1209 AF_UNIX stream socket. This interface
1210 is private to systemd and should not
1212 projects.</para></listitem>
1216 <term><filename>/dev/initctl</filename></term>
1218 <listitem><para>Limited compatibility
1219 support for the SysV client interface,
1220 as implemented by the
1221 <filename>systemd-initctl.service</filename>
1222 unit. This is a named pipe in the file
1223 system. This interface is obsolete and
1224 should not be used in new
1225 applications.</para></listitem>
1231 <title>See Also</title>
1233 <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1234 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1235 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1236 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1237 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1238 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1239 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1240 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1241 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1242 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1243 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1244 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>