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>
491 <para>Systems which invoke systemd in a container
492 resp. initrd environment should implement the
494 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
495 Interface</ulink> resp. <ulink
496 url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd
497 Interface</ulink> specifications.</para>
501 <title>Directories</title>
505 <term>System unit directories</term>
507 <listitem><para>The systemd system
508 manager reads unit configuration from
509 various directories. Packages that
510 want to install unit files shall place
511 them in the directory returned by
512 <command>pkg-config systemd
513 --variable=systemdsystemunitdir</command>. Other
514 directories checked are
515 <filename>/usr/local/lib/systemd/system</filename>
517 <filename>/usr/lib/systemd/system</filename>. User
518 configuration always takes
519 precedence. <command>pkg-config
521 --variable=systemdsystemconfdir</command>
522 returns the path of the system
523 configuration directory. Packages
524 should alter the content of these
525 directories only with the
526 <command>enable</command> and
527 <command>disable</command> commands of
529 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
530 tool.</para></listitem>
536 <term>User unit directories</term>
538 <listitem><para>Similar rules apply
540 directories. However, here the <ulink
541 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
542 Base Directory specification</ulink>
544 units. Applications should place their
545 unit files in the directory returned
546 by <command>pkg-config systemd
547 --variable=systemduserunitdir</command>. Global
548 configuration is done in the directory
549 reported by <command>pkg-config
551 --variable=systemduserconfdir</command>. The
552 <command>enable</command> and
553 <command>disable</command> commands of
555 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
556 tool can handle both global (i.e. for
557 all users) and private (for one user)
558 enabling/disabling of
559 units.</para></listitem>
565 <term>SysV init scripts directory</term>
567 <listitem><para>The location of the
568 SysV init script directory varies
569 between distributions. If systemd
570 cannot find a native unit file for a
571 requested service, it will look for a
572 SysV init script of the same name
574 <filename>.service</filename> suffix
575 removed).</para></listitem>
581 <term>SysV runlevel link farm directory</term>
583 <listitem><para>The location of the
584 SysV runlevel link farm directory
585 varies between distributions. systemd
586 will take the link farm into account
587 when figuring out whether a service
588 shall be enabled. Note that a service
589 unit with a native unit configuration
590 file cannot be started by activating it
591 in the SysV runlevel link
592 farm.</para></listitem>
598 <title>Signals</title>
604 <listitem><para>Upon receiving this
605 signal the systemd system manager
606 serializes its state, reexecutes
607 itself and deserializes the saved
608 state again. This is mostly equivalent
609 to <command>systemctl
610 daemon-reexec</command>.</para>
612 <para>systemd user managers will
614 <filename>exit.target</filename> unit
615 when this signal is received. This is
617 <command>systemctl --user start
618 exit.target</command>.</para></listitem>
624 <listitem><para>Upon receiving this
625 signal the systemd system manager will
627 <filename>ctrl-alt-del.target</filename> unit. This
628 is mostly equivalent to
629 <command>systemctl start
630 ctl-alt-del.target</command>.</para>
632 <para>systemd user managers
633 treat this signal the same way as
634 SIGTERM.</para></listitem>
638 <term>SIGWINCH</term>
640 <listitem><para>When this signal is
641 received the systemd system manager
643 <filename>kbrequest.target</filename>
644 unit. This is mostly equivalent to
645 <command>systemctl start
646 kbrequest.target</command>.</para>
648 <para>This signal is ignored by
650 managers.</para></listitem>
656 <listitem><para>When this signal is
657 received the systemd manager
659 <filename>sigpwr.target</filename>
660 unit. This is mostly equivalent to
661 <command>systemctl start
662 sigpwr.target</command>.</para></listitem>
668 <listitem><para>When this signal is
669 received the systemd manager will try
670 to reconnect to the D-Bus
671 bus.</para></listitem>
677 <listitem><para>When this signal is
678 received the systemd manager will log
679 its complete state in human readable
680 form. The data logged is the same as
681 printed by <command>systemctl
682 dump</command>.</para></listitem>
688 <listitem><para>Reloads the complete
689 daemon configuration. This is mostly
690 equivalent to <command>systemctl
691 daemon-reload</command>.</para></listitem>
695 <term>SIGRTMIN+0</term>
697 <listitem><para>Enters default mode, starts the
698 <filename>default.target</filename>
699 unit. This is mostly equivalent to
700 <command>systemctl start
701 default.target</command>.</para></listitem>
705 <term>SIGRTMIN+1</term>
707 <listitem><para>Enters rescue mode,
709 <filename>rescue.target</filename>
710 unit. This is mostly equivalent to
711 <command>systemctl isolate
712 rescue.target</command>.</para></listitem>
716 <term>SIGRTMIN+2</term>
718 <listitem><para>Enters emergency mode,
720 <filename>emergency.service</filename>
721 unit. This is mostly equivalent to
722 <command>systemctl isolate
723 emergency.service</command>.</para></listitem>
727 <term>SIGRTMIN+3</term>
729 <listitem><para>Halts the machine,
731 <filename>halt.target</filename>
732 unit. This is mostly equivalent to
733 <command>systemctl start
734 halt.target</command>.</para></listitem>
738 <term>SIGRTMIN+4</term>
740 <listitem><para>Powers off the machine,
742 <filename>poweroff.target</filename>
743 unit. This is mostly equivalent to
744 <command>systemctl start
745 poweroff.target</command>.</para></listitem>
749 <term>SIGRTMIN+5</term>
751 <listitem><para>Reboots the machine,
753 <filename>reboot.target</filename>
754 unit. This is mostly equivalent to
755 <command>systemctl start
756 reboot.target</command>.</para></listitem>
760 <term>SIGRTMIN+6</term>
762 <listitem><para>Reboots the machine via kexec,
764 <filename>kexec.target</filename>
765 unit. This is mostly equivalent to
766 <command>systemctl start
767 kexec.target</command>.</para></listitem>
771 <term>SIGRTMIN+13</term>
773 <listitem><para>Immediately halts the machine.</para></listitem>
777 <term>SIGRTMIN+14</term>
779 <listitem><para>Immediately powers off the machine.</para></listitem>
783 <term>SIGRTMIN+15</term>
785 <listitem><para>Immediately reboots the machine.</para></listitem>
789 <term>SIGRTMIN+16</term>
791 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
795 <term>SIGRTMIN+20</term>
797 <listitem><para>Enables display of
798 status messages on the console, as
800 <varname>systemd.show_status=1</varname>
801 on the kernel command
802 line.</para></listitem>
806 <term>SIGRTMIN+21</term>
808 <listitem><para>Disables display of
809 status messages on the console, as
811 <varname>systemd.show_status=0</varname>
812 on the kernel command
813 line.</para></listitem>
817 <term>SIGRTMIN+22</term>
818 <term>SIGRTMIN+23</term>
820 <listitem><para>Sets the log level to
821 <literal>debug</literal>
822 (resp. <literal>info</literal> on
823 <literal>SIGRTMIN+23</literal>), as
825 <varname>systemd.log_level=debug</varname>
826 (resp. <varname>systemd.log_level=info</varname>
827 on <literal>SIGRTMIN+23</literal>) on
829 line.</para></listitem>
833 <term>SIGRTMIN+26</term>
834 <term>SIGRTMIN+27</term>
835 <term>SIGRTMIN+28</term>
836 <term>SIGRTMIN+29</term>
838 <listitem><para>Sets the log level to
839 <literal>journal-or-kmsg</literal>
840 (resp. <literal>console</literal> on
841 <literal>SIGRTMIN+27</literal>;
842 resp. <literal>kmsg</literal> on
843 <literal>SIGRTMIN+28</literal>;
844 resp. <literal>syslog-or-kmsg</literal>
845 on <literal>SIGRTMIN+29</literal>), as
847 <varname>systemd.log_target=journal-or-kmsg</varname>
848 (resp. <varname>systemd.log_target=console</varname>
849 on <literal>SIGRTMIN+27</literal>;
850 resp. <varname>systemd.log_target=kmsg</varname>
851 on <literal>SIGRTMIN+28</literal>;
853 <varname>systemd.log_target=syslog-or-kmsg</varname>
854 on <literal>SIGRTMIN+29</literal>) on
856 line.</para></listitem>
862 <title>Environment</title>
866 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
867 <listitem><para>systemd reads the
868 log level from this environment
869 variable. This can be overridden with
870 <option>--log-level=</option>.</para></listitem>
874 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
875 <listitem><para>systemd reads the
876 log target from this environment
877 variable. This can be overridden with
878 <option>--log-target=</option>.</para></listitem>
882 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
883 <listitem><para>Controls whether
884 systemd highlights important log
885 messages. This can be overridden with
886 <option>--log-color=</option>.</para></listitem>
890 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
891 <listitem><para>Controls whether
892 systemd prints the code location along
893 with log messages. This can be
895 <option>--log-location=</option>.</para></listitem>
899 <term><varname>$XDG_CONFIG_HOME</varname></term>
900 <term><varname>$XDG_CONFIG_DIRS</varname></term>
901 <term><varname>$XDG_DATA_HOME</varname></term>
902 <term><varname>$XDG_DATA_DIRS</varname></term>
904 <listitem><para>The systemd user
905 manager uses these variables in
906 accordance to the <ulink
907 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
908 Base Directory specification</ulink>
909 to find its configuration.</para></listitem>
913 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
915 <listitem><para>Controls where systemd
917 files.</para></listitem>
921 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
923 <listitem><para>Controls where systemd
924 looks for SysV init scripts.</para></listitem>
928 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
930 <listitem><para>Controls where systemd
931 looks for SysV init script runlevel link
932 farms.</para></listitem>
936 <term><varname>$LISTEN_PID</varname></term>
937 <term><varname>$LISTEN_FDS</varname></term>
939 <listitem><para>Set by systemd for
940 supervised processes during
941 socket-based activation. See
942 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
943 for more information.
948 <term><varname>$NOTIFY_SOCKET</varname></term>
950 <listitem><para>Set by systemd for
951 supervised processes for status and
952 start-up completion notification. See
953 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
954 for more information.
961 <title>Kernel Command Line</title>
963 <para>When run as system instance systemd parses a
964 number of kernel command line
965 arguments<footnote><para>If run inside a Linux
966 container these arguments may be passed as command
967 line arguments to systemd itself, next to any of the
968 command line options listed in the Options section
969 above. If run outside of Linux containers, these
970 arguments are parsed from
971 <filename>/proc/cmdline</filename>
972 instead.</para></footnote>:</para>
976 <term><varname>systemd.unit=</varname></term>
977 <term><varname>rd.systemd.unit=</varname></term>
979 <listitem><para>Overrides the unit to
980 activate on boot. Defaults to
981 <filename>default.target</filename>. This
982 may be used to temporarily boot into a
983 different boot unit, for example
984 <filename>rescue.target</filename> or
985 <filename>emergency.service</filename>. See
986 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
987 for details about these units. The
989 <literal>rd.</literal> is honoured
990 only in the initial RAM disk (initrd),
991 while the one that isn't prefixed only
992 in the main system.</para></listitem>
996 <term><varname>systemd.dump_core=</varname></term>
998 <listitem><para>Takes a boolean
999 argument. If <option>true</option>
1000 systemd dumps core when it
1001 crashes. Otherwise no core dump is
1002 created. Defaults to
1003 <option>true</option>.</para></listitem>
1007 <term><varname>systemd.crash_shell=</varname></term>
1009 <listitem><para>Takes a boolean
1010 argument. If <option>true</option>
1011 systemd spawns a shell when it
1012 crashes. Otherwise no shell is
1013 spawned. Defaults to
1014 <option>false</option>, for security
1015 reasons, as the shell is not protected
1017 authentication.</para></listitem>
1021 <term><varname>systemd.crash_chvt=</varname></term>
1023 <listitem><para>Takes an integer
1024 argument. If positive systemd
1025 activates the specified virtual
1026 terminal when it crashes. Defaults to
1027 <literal>-1</literal>.</para></listitem>
1031 <term><varname>systemd.confirm_spawn=</varname></term>
1033 <listitem><para>Takes a boolean
1034 argument. If <option>true</option>
1035 asks for confirmation when spawning
1036 processes. Defaults to
1037 <option>false</option>.</para></listitem>
1041 <term><varname>systemd.show_status=</varname></term>
1043 <listitem><para>Takes a boolean
1044 argument. If <option>true</option>
1045 shows terse service status updates on
1046 the console during bootup. Defaults to
1047 <option>true</option>, unless
1048 <option>quiet</option> is passed as
1049 kernel command line option in which
1051 <option>false</option>.</para></listitem>
1055 <term><varname>systemd.log_target=</varname></term>
1056 <term><varname>systemd.log_level=</varname></term>
1057 <term><varname>systemd.log_color=</varname></term>
1058 <term><varname>systemd.log_location=</varname></term>
1060 <listitem><para>Controls log output,
1061 with the same effect as the
1062 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1063 environment variables described above.</para></listitem>
1067 <term><varname>systemd.default_standard_output=</varname></term>
1068 <term><varname>systemd.default_standard_error=</varname></term>
1069 <listitem><para>Controls default
1070 standard output/error output for
1071 services, with the same effect as the
1072 <option>--default-standard-output=</option>
1073 resp. <option>--default-standard-error=</option>
1074 command line arguments described
1075 above.</para></listitem>
1079 <term><varname>systemd.setenv=</varname></term>
1081 <listitem><para>Takes a string
1082 argument in the form
1083 VARIABLE=VALUE. May be used to set
1084 environment variables for the init
1085 process and all its children at boot
1086 time. May be used more than once to
1087 set multiple variables. If the equal
1088 sign and variable are missing unsets
1089 an environment variable which might be
1090 passed in from the initial ram
1091 disk.</para></listitem>
1095 <term><varname>quiet</varname></term>
1097 <listitem><para>If passed turns off
1098 status output at boot, much like
1099 <varname>systemd.show_status=false</varname>
1100 would. Note that this option is also
1101 read by the kernel itself and disables
1102 kernel log output to the
1103 kernel. Passing this option hence
1104 turns off the usual output from both
1105 the system manager and the
1106 kernel.</para></listitem>
1110 <term><varname>emergency</varname></term>
1112 <listitem><para>Boot into emergency
1113 mode. This is equivalent to
1114 <varname>systemd.unit=emergency.target</varname>
1115 and provided for compatibility
1116 reasons and to be easier to type.</para></listitem>
1120 <term><varname>single</varname></term>
1121 <term><varname>s</varname></term>
1122 <term><varname>S</varname></term>
1123 <term><varname>1</varname></term>
1125 <listitem><para>Boot into rescue
1126 mode. This is equivalent to
1127 <varname>systemd.unit=rescue.target</varname>
1128 and provided for compatibility reasons
1130 type.</para></listitem>
1134 <term><varname>2</varname></term>
1135 <term><varname>3</varname></term>
1136 <term><varname>4</varname></term>
1137 <term><varname>5</varname></term>
1139 <listitem><para>Boot into the
1140 specified legacy SysV runlevel. This
1142 <varname>systemd.unit=runlevel2.target</varname>,
1143 <varname>systemd.unit=runlevel3.target</varname>,
1144 <varname>systemd.unit=runlevel4.target</varname>,
1145 resp. <varname>systemd.unit=runlevel5.target</varname>
1146 and provided for compatibility reasons
1148 type.</para></listitem>
1152 <term><varname>locale.LANG=</varname></term>
1153 <term><varname>locale.LANGUAGE=</varname></term>
1154 <term><varname>locale.LC_CTYPE=</varname></term>
1155 <term><varname>locale.LC_NUMERIC=</varname></term>
1156 <term><varname>locale.LC_TIME=</varname></term>
1157 <term><varname>locale.LC_COLLATE=</varname></term>
1158 <term><varname>locale.LC_MONETARY=</varname></term>
1159 <term><varname>locale.LC_MESSAGES=</varname></term>
1160 <term><varname>locale.LC_PAPER=</varname></term>
1161 <term><varname>locale.LC_NAME=</varname></term>
1162 <term><varname>locale.LC_ADDRESS=</varname></term>
1163 <term><varname>locale.LC_TELEPHONE=</varname></term>
1164 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1165 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1167 <listitem><para>Set the system locale
1168 to use. This overrides the settings in
1169 <filename>/etc/locale.conf</filename>. For
1170 more information see
1171 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1173 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1178 <para>For other kernel command line parameters
1179 understood by components of the core OS, please refer
1181 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1185 <title>Sockets and FIFOs</title>
1189 <term><filename>/run/systemd/notify</filename></term>
1191 <listitem><para>Daemon status
1192 notification socket. This is an
1193 AF_UNIX datagram socket and is used to
1194 implement the daemon notification
1195 logic as implemented by
1196 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1201 <term><filename>/run/systemd/shutdownd</filename></term>
1203 <listitem><para>Used internally by the
1204 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1205 tool to implement delayed
1206 shutdowns. This is an AF_UNIX datagram
1207 socket.</para></listitem>
1211 <term><filename>/run/systemd/private</filename></term>
1213 <listitem><para>Used internally as
1214 communication channel between
1215 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1216 and the systemd process. This is an
1217 AF_UNIX stream socket. This interface
1218 is private to systemd and should not
1220 projects.</para></listitem>
1224 <term><filename>/dev/initctl</filename></term>
1226 <listitem><para>Limited compatibility
1227 support for the SysV client interface,
1228 as implemented by the
1229 <filename>systemd-initctl.service</filename>
1230 unit. This is a named pipe in the file
1231 system. This interface is obsolete and
1232 should not be used in new
1233 applications.</para></listitem>
1239 <title>See Also</title>
1241 <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1242 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1243 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1244 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1245 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1246 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1247 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1248 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1249 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1250 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1251 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1252 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>