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"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>systemd</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
42 <refentrytitle>systemd</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>systemd</refname>
48 <refname>init</refname>
49 <refpurpose>systemd system and service manager</refpurpose>
54 <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
57 <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
62 <title>Description</title>
64 <para>systemd is a system and service manager for
65 Linux operating systems. When run as first process on
66 boot (as PID 1), it acts as init system that brings
67 up and maintains userspace services.</para>
69 <para>For compatibility with SysV, if systemd is called
70 as <command>init</command> and a PID that is not
71 1, it will execute <command>telinit</command> and pass
72 all command line arguments unmodified. That means
73 <command>init</command> and <command>telinit</command>
74 are mostly equivalent when invoked from normal login sessions. See
75 <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
76 for more information.</para>
78 <para>When run as a system instance, systemd interprets the
79 configuration file <filename>system.conf</filename> and the
80 files in <filename>system.conf.d</filename> directories; when
81 run as a user instance, systemd interprets the configuration
82 file <filename>user.conf</filename> and the files in
83 <filename>user.conf.d</filename> directories. See
84 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
85 for more information.</para>
89 <title>Options</title>
91 <para>The following options are understood:</para>
95 <term><option>--test</option></term>
97 <listitem><para>Determine startup
98 sequence, dump it and exit. This is an
99 option useful for debugging
100 only.</para></listitem>
103 <term><option>--dump-configuration-items</option></term>
105 <listitem><para>Dump understood unit
106 configuration items. This outputs a
107 terse but complete list of
108 configuration items understood in unit
109 definition files.</para></listitem>
112 <term><option>--unit=</option></term>
114 <listitem><para>Set default unit to
115 activate on startup. If not specified,
117 <filename>default.target</filename>.</para></listitem>
120 <term><option>--system</option></term>
121 <term><option>--user</option></term>
123 <listitem><para>For <option>--system</option>,
124 tell systemd to run a
125 system instance, even if the process ID is
126 not 1, i.e. systemd is not run as init process.
127 <option>--user</option> does the opposite,
128 running a user instance even if the process
130 Normally it should not be necessary to
131 pass these options, as systemd
132 automatically detects the mode it is
133 started in. These options are hence of
134 little use except for debugging. Note
135 that it is not supported booting and
136 maintaining a full system with systemd
137 running in <option>--system</option>
138 mode, but PID not 1. In practice,
139 passing <option>--system</option> explicitly is
140 only useful in conjunction with
141 <option>--test</option>.</para></listitem>
144 <term><option>--dump-core</option></term>
146 <listitem><para>Dump core on
147 crash. This switch has no effect when
149 instance.</para></listitem>
152 <term><option>--crash-shell</option></term>
154 <listitem><para>Run shell on
155 crash. This switch has no effect when
157 instance.</para></listitem>
160 <term><option>--confirm-spawn</option></term>
162 <listitem><para>Ask for confirmation
163 when spawning processes. This switch
164 has no effect when run as user
165 instance.</para></listitem>
168 <term><option>--show-status=</option></term>
170 <listitem><para>Show terse service
171 status information while booting. This
172 switch has no effect when run as user
173 instance. Takes a boolean argument
174 which may be omitted which is
176 <option>true</option>.</para></listitem>
179 <term><option>--log-target=</option></term>
181 <listitem><para>Set log
182 target. Argument must be one of
183 <option>console</option>,
184 <option>journal</option>,
185 <option>kmsg</option>,
186 <option>journal-or-kmsg</option>,
187 <option>null</option>.</para></listitem>
190 <term><option>--log-level=</option></term>
192 <listitem><para>Set log level. As
193 argument this accepts a numerical log
194 level or the well-known <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
195 symbolic names (lowercase):
196 <option>emerg</option>,
197 <option>alert</option>,
198 <option>crit</option>,
199 <option>err</option>,
200 <option>warning</option>,
201 <option>notice</option>,
202 <option>info</option>,
203 <option>debug</option>.</para></listitem>
206 <term><option>--log-color=</option></term>
208 <listitem><para>Highlight important
209 log messages. Argument is a boolean
210 value. If the argument is omitted, it
212 <option>true</option>.</para></listitem>
215 <term><option>--log-location=</option></term>
217 <listitem><para>Include code location
218 in log messages. This is mostly
219 relevant for debugging
220 purposes. Argument is a boolean
221 value. If the argument is omitted
223 <option>true</option>.</para></listitem>
226 <term><option>--default-standard-output=</option></term>
227 <term><option>--default-standard-error=</option></term>
229 <listitem><para>Sets the default
230 output or error output for all
231 services and sockets, respectively. That is, controls
233 <option>StandardOutput=</option>
234 and <option>StandardError=</option>
236 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
237 for details). Takes one of
238 <option>inherit</option>,
239 <option>null</option>,
240 <option>tty</option>,
241 <option>journal</option>,
242 <option>journal+console</option>,
243 <option>syslog</option>,
244 <option>syslog+console</option>,
245 <option>kmsg</option>,
246 <option>kmsg+console</option>. If the
248 <option>--default-standard-output=</option>
249 defaults to <option>journal</option>
251 <option>--default-standard-error=</option>
253 <option>inherit</option>.</para></listitem>
256 <xi:include href="standard-options.xml" xpointer="help" />
257 <xi:include href="standard-options.xml" xpointer="version" />
262 <title>Concepts</title>
264 <para>systemd provides a dependency system between
265 various entities called "units" of 12 different
266 types. Units encapsulate various objects that are
267 relevant for system boot-up and maintenance. The
268 majority of units are configured in unit configuration
269 files, whose syntax and basic set of options is
271 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
272 however some are created automatically from other
273 configuration, dynamically from system state or
274 programmatically at runtime. Units may be "active"
275 (meaning started, bound, plugged in, ..., depending on
276 the unit type, see below), or "inactive" (meaning
277 stopped, unbound, unplugged, ...), as well as in the
278 process of being activated or deactivated,
279 i.e. between the two states (these states are called
280 "activating", "deactivating"). A special "failed"
281 state is available as well, which is very similar to
282 "inactive" and is entered when the service failed in
283 some way (process returned error code on exit, or
284 crashed, or an operation timed out). If this state is
285 entered, the cause will be logged, for later
286 reference. Note that the various unit types may have a
287 number of additional substates, which are mapped to
288 the five generalized unit states described
291 <para>The following unit types are available:</para>
294 <listitem><para>Service units, which start and control
295 daemons and the processes they consist of. For
297 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
299 <listitem><para>Socket units, which
300 encapsulate local IPC or network sockets in
301 the system, useful for socket-based
302 activation. For details about socket units see
303 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
304 for details on socket-based activation and
305 other forms of activation, see
306 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
308 <listitem><para>Target units are useful to
309 group units, or provide well-known
310 synchronization points during boot-up, see
311 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
313 <listitem><para>Device units expose kernel
314 devices in systemd and may be used to
315 implement device-based activation. For details
317 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
319 <listitem><para>Mount units control mount
320 points in the file system, for details see
321 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
323 <listitem><para>Automount units provide
324 automount capabilities, for on-demand mounting
325 of file systems as well as parallelized
327 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
329 <listitem><para>Snapshot units can be used to
330 temporarily save the state of the set of
331 systemd units, which later may be restored by
332 activating the saved snapshot unit. For more
334 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
336 <listitem><para>Timer units are useful for
337 triggering activation of other units based on
338 timers. You may find details in
339 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
341 <listitem><para>Swap units are very similar to
342 mount units and encapsulate memory swap
343 partitions or files of the operating
344 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
346 <listitem><para>Path units may be used
347 to activate other services when file system
348 objects change or are modified. See
349 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
351 <listitem><para>Slice units may be used to
352 group units which manage system processes
353 (such as service and scope units) in a
354 hierarchical tree for resource management
356 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
358 <listitem><para>Scope units are similar to
359 service units, but manage foreign processes
360 instead of starting them as well. See
361 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
365 <para>Units are named as their configuration
366 files. Some units have special semantics. A detailed
368 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
370 <para>systemd knows various kinds of dependencies,
371 including positive and negative requirement
372 dependencies (i.e. <varname>Requires=</varname> and
373 <varname>Conflicts=</varname>) as well as ordering
374 dependencies (<varname>After=</varname> and
375 <varname>Before=</varname>). NB: ordering and
376 requirement dependencies are orthogonal. If only a
377 requirement dependency exists between two units
378 (e.g. <filename>foo.service</filename> requires
379 <filename>bar.service</filename>), but no ordering
380 dependency (e.g. <filename>foo.service</filename>
381 after <filename>bar.service</filename>) and both are
382 requested to start, they will be started in
383 parallel. It is a common pattern that both requirement
384 and ordering dependencies are placed between two
385 units. Also note that the majority of dependencies are
386 implicitly created and maintained by systemd. In most
387 cases, it should be unnecessary to declare additional
388 dependencies manually, however it is possible to do
391 <para>Application programs and units (via
392 dependencies) may request state changes of units. In
393 systemd, these requests are encapsulated as 'jobs' and
394 maintained in a job queue. Jobs may succeed or can
395 fail, their execution is ordered based on the ordering
396 dependencies of the units they have been scheduled
399 <para>On boot systemd activates the target unit
400 <filename>default.target</filename> whose job is to
401 activate on-boot services and other on-boot units by
402 pulling them in via dependencies. Usually the unit
403 name is just an alias (symlink) for either
404 <filename>graphical.target</filename> (for
405 fully-featured boots into the UI) or
406 <filename>multi-user.target</filename> (for limited
407 console-only boots for use in embedded or server
408 environments, or similar; a subset of
409 graphical.target). However, it is at the discretion of
410 the administrator to configure it as an alias to any
411 other target unit. See
412 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
413 for details about these target units.</para>
415 <para>Processes systemd spawns are placed in
416 individual Linux control groups named after the unit
417 which they belong to in the private systemd
418 hierarchy. (see <ulink
419 url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
420 for more information about control groups, or short
421 "cgroups"). systemd uses this to effectively keep
422 track of processes. Control group information is
423 maintained in the kernel, and is accessible via the
424 file system hierarchy (beneath
425 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
427 <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
428 (<command>ps xawf -eo pid,user,cgroup,args</command>
429 is particularly useful to list all processes and the
430 systemd units they belong to.).</para>
432 <para>systemd is compatible with the SysV init system
433 to a large degree: SysV init scripts are supported and
434 simply read as an alternative (though limited)
435 configuration file format. The SysV
436 <filename>/dev/initctl</filename> interface is
437 provided, and compatibility implementations of the
438 various SysV client tools are available. In addition to
439 that, various established Unix functionality such as
440 <filename>/etc/fstab</filename> or the
441 <filename>utmp</filename> database are
444 <para>systemd has a minimal transaction system: if a
445 unit is requested to start up or shut down it will add
446 it and all its dependencies to a temporary
447 transaction. Then, it will verify if the transaction
448 is consistent (i.e. whether the ordering of all units
449 is cycle-free). If it is not, systemd will try to fix
450 it up, and removes non-essential jobs from the
451 transaction that might remove the loop. Also, systemd
452 tries to suppress non-essential jobs in the
453 transaction that would stop a running service. Finally
454 it is checked whether the jobs of the transaction
455 contradict jobs that have already been queued, and
456 optionally the transaction is aborted then. If all
457 worked out and the transaction is consistent and
458 minimized in its impact it is merged with all already
459 outstanding jobs and added to the run
460 queue. Effectively this means that before executing a
461 requested operation, systemd will verify that it makes
462 sense, fixing it if possible, and only failing if it
463 really cannot work.</para>
465 <para>Systemd contains native implementations of
466 various tasks that need to be executed as part of the
467 boot process. For example, it sets the hostname or
468 configures the loopback network device. It also sets
469 up and mounts various API file systems, such as
470 <filename>/sys</filename> or
471 <filename>/proc</filename>.</para>
473 <para>For more information about the concepts and
474 ideas behind systemd, please refer to the <ulink
475 url="http://0pointer.de/blog/projects/systemd.html">Original
476 Design Document</ulink>.</para>
478 <para>Note that some but not all interfaces provided
479 by systemd are covered by the <ulink
480 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
481 Stability Promise</ulink>.</para>
483 <para>Units may be generated dynamically at boot and
484 system manager reload time, for example based on other
485 configuration files or parameters passed on the kernel
486 command line. For details see the <ulink
487 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
488 Specification</ulink>.</para>
490 <para>Systems which invoke systemd in a container
491 or initrd environment should implement the
493 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
494 Interface</ulink> or <ulink
495 url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd
496 Interface</ulink> specifications, respectively.</para>
500 <title>Directories</title>
504 <term>System unit directories</term>
506 <listitem><para>The systemd system
507 manager reads unit configuration from
508 various directories. Packages that
509 want to install unit files shall place
510 them in the directory returned by
511 <command>pkg-config systemd
512 --variable=systemdsystemunitdir</command>. Other
513 directories checked are
514 <filename>/usr/local/lib/systemd/system</filename>
516 <filename>/usr/lib/systemd/system</filename>. User
517 configuration always takes
518 precedence. <command>pkg-config
520 --variable=systemdsystemconfdir</command>
521 returns the path of the system
522 configuration directory. Packages
523 should alter the content of these
524 directories only with the
525 <command>enable</command> and
526 <command>disable</command> commands of
528 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
529 tool. Full list of directories is provided in
530 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
537 <term>User unit directories</term>
539 <listitem><para>Similar rules apply
541 directories. However, here the <ulink
542 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
543 Base Directory specification</ulink>
545 units. Applications should place their
546 unit files in the directory returned
547 by <command>pkg-config systemd
548 --variable=systemduserunitdir</command>. Global
549 configuration is done in the directory
550 reported by <command>pkg-config
552 --variable=systemduserconfdir</command>. The
553 <command>enable</command> and
554 <command>disable</command> commands of
556 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
557 tool can handle both global (i.e. for
558 all users) and private (for one user)
559 enabling/disabling of
560 units. Full list of directories is provided in
561 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
568 <term>SysV init scripts directory</term>
570 <listitem><para>The location of the
571 SysV init script directory varies
572 between distributions. If systemd
573 cannot find a native unit file for a
574 requested service, it will look for a
575 SysV init script of the same name
577 <filename>.service</filename> suffix
578 removed).</para></listitem>
584 <term>SysV runlevel link farm directory</term>
586 <listitem><para>The location of the
587 SysV runlevel link farm directory
588 varies between distributions. systemd
589 will take the link farm into account
590 when figuring out whether a service
591 shall be enabled. Note that a service
592 unit with a native unit configuration
593 file cannot be started by activating it
594 in the SysV runlevel link
595 farm.</para></listitem>
601 <title>Signals</title>
605 <term><constant>SIGTERM</constant></term>
607 <listitem><para>Upon receiving this
608 signal the systemd system manager
609 serializes its state, reexecutes
610 itself and deserializes the saved
611 state again. This is mostly equivalent
612 to <command>systemctl
613 daemon-reexec</command>.</para>
615 <para>systemd user managers will
617 <filename>exit.target</filename> unit
618 when this signal is received. This is
620 <command>systemctl --user start
621 exit.target</command>.</para></listitem>
625 <term><constant>SIGINT</constant></term>
627 <listitem><para>Upon receiving this
628 signal the systemd system manager will
630 <filename>ctrl-alt-del.target</filename>
631 unit. This is mostly equivalent to
632 <command>systemctl start
633 ctl-alt-del.target</command>. If this
634 signal is received more often than 7
635 times per 2s an immediate reboot is
636 triggered. Note that pressing
637 Ctrl-Alt-Del on the console will
638 trigger this signal. Hence, if a
639 reboot is hanging pressing
640 Ctrl-Alt-Del more than 7 times in 2s
641 is a relatively safe way to trigger an
642 immediate reboot.</para>
644 <para>systemd user managers
645 treat this signal the same way as
646 <constant>SIGTERM</constant>.</para></listitem>
650 <term><constant>SIGWINCH</constant></term>
652 <listitem><para>When this signal is
653 received the systemd system manager
655 <filename>kbrequest.target</filename>
656 unit. This is mostly equivalent to
657 <command>systemctl start
658 kbrequest.target</command>.</para>
660 <para>This signal is ignored by
662 managers.</para></listitem>
666 <term><constant>SIGPWR</constant></term>
668 <listitem><para>When this signal is
669 received the systemd manager
671 <filename>sigpwr.target</filename>
672 unit. This is mostly equivalent to
673 <command>systemctl start
674 sigpwr.target</command>.</para></listitem>
678 <term><constant>SIGUSR1</constant></term>
680 <listitem><para>When this signal is
681 received the systemd manager will try
682 to reconnect to the D-Bus
683 bus.</para></listitem>
687 <term><constant>SIGUSR2</constant></term>
689 <listitem><para>When this signal is
690 received the systemd manager will log
691 its complete state in human readable
692 form. The data logged is the same as
693 printed by <command>systemd-analyze
694 dump</command>.</para></listitem>
698 <term><constant>SIGHUP</constant></term>
700 <listitem><para>Reloads the complete
701 daemon configuration. This is mostly
702 equivalent to <command>systemctl
703 daemon-reload</command>.</para></listitem>
707 <term><constant>SIGRTMIN+0</constant></term>
709 <listitem><para>Enters default mode, starts the
710 <filename>default.target</filename>
711 unit. This is mostly equivalent to
712 <command>systemctl start
713 default.target</command>.</para></listitem>
717 <term><constant>SIGRTMIN+1</constant></term>
719 <listitem><para>Enters rescue mode,
721 <filename>rescue.target</filename>
722 unit. This is mostly equivalent to
723 <command>systemctl isolate
724 rescue.target</command>.</para></listitem>
728 <term><constant>SIGRTMIN+2</constant></term>
730 <listitem><para>Enters emergency mode,
732 <filename>emergency.service</filename>
733 unit. This is mostly equivalent to
734 <command>systemctl isolate
735 emergency.service</command>.</para></listitem>
739 <term><constant>SIGRTMIN+3</constant></term>
741 <listitem><para>Halts the machine,
743 <filename>halt.target</filename>
744 unit. This is mostly equivalent to
745 <command>systemctl start
746 halt.target</command>.</para></listitem>
750 <term><constant>SIGRTMIN+4</constant></term>
752 <listitem><para>Powers off the machine,
754 <filename>poweroff.target</filename>
755 unit. This is mostly equivalent to
756 <command>systemctl start
757 poweroff.target</command>.</para></listitem>
761 <term><constant>SIGRTMIN+5</constant></term>
763 <listitem><para>Reboots the machine,
765 <filename>reboot.target</filename>
766 unit. This is mostly equivalent to
767 <command>systemctl start
768 reboot.target</command>.</para></listitem>
772 <term><constant>SIGRTMIN+6</constant></term>
774 <listitem><para>Reboots the machine via kexec,
776 <filename>kexec.target</filename>
777 unit. This is mostly equivalent to
778 <command>systemctl start
779 kexec.target</command>.</para></listitem>
783 <term><constant>SIGRTMIN+13</constant></term>
785 <listitem><para>Immediately halts the machine.</para></listitem>
789 <term><constant>SIGRTMIN+14</constant></term>
791 <listitem><para>Immediately powers off the machine.</para></listitem>
795 <term><constant>SIGRTMIN+15</constant></term>
797 <listitem><para>Immediately reboots the machine.</para></listitem>
801 <term><constant>SIGRTMIN+16</constant></term>
803 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
807 <term><constant>SIGRTMIN+20</constant></term>
809 <listitem><para>Enables display of
810 status messages on the console, as
812 <varname>systemd.show_status=1</varname>
813 on the kernel command
814 line.</para></listitem>
818 <term><constant>SIGRTMIN+21</constant></term>
820 <listitem><para>Disables display of
821 status messages on the console, as
823 <varname>systemd.show_status=0</varname>
824 on the kernel command
825 line.</para></listitem>
829 <term><constant>SIGRTMIN+22</constant></term>
830 <term><constant>SIGRTMIN+23</constant></term>
832 <listitem><para>Sets the log level to
833 <literal>debug</literal>
834 (or <literal>info</literal> on
835 <constant>SIGRTMIN+23</constant>), as
837 <varname>systemd.log_level=debug</varname>
838 (or <varname>systemd.log_level=info</varname>
839 on <constant>SIGRTMIN+23</constant>) on
841 line.</para></listitem>
845 <term><constant>SIGRTMIN+24</constant></term>
847 <listitem><para>Immediately exits the
848 manager (only available for --user
849 instances).</para></listitem>
853 <term><constant>SIGRTMIN+26</constant></term>
854 <term><constant>SIGRTMIN+27</constant></term>
855 <term><constant>SIGRTMIN+28</constant></term>
857 <listitem><para>Sets the log level to
858 <literal>journal-or-kmsg</literal> (or
859 <literal>console</literal> on
860 <constant>SIGRTMIN+27</constant>,
861 <literal>kmsg</literal> on
862 <constant>SIGRTMIN+28</constant>), as
864 <varname>systemd.log_target=journal-or-kmsg</varname>
866 <varname>systemd.log_target=console</varname>
867 on <constant>SIGRTMIN+27</constant> or
868 <varname>systemd.log_target=kmsg</varname>
869 on <constant>SIGRTMIN+28</constant>)
870 on the kernel command
871 line.</para></listitem>
877 <title>Environment</title>
879 <variablelist class='environment-variables'>
881 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
882 <listitem><para>systemd reads the
883 log level from this environment
884 variable. This can be overridden with
885 <option>--log-level=</option>.</para></listitem>
889 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
890 <listitem><para>systemd reads the
891 log target from this environment
892 variable. This can be overridden with
893 <option>--log-target=</option>.</para></listitem>
897 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
898 <listitem><para>Controls whether
899 systemd highlights important log
900 messages. This can be overridden with
901 <option>--log-color=</option>.</para></listitem>
905 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
906 <listitem><para>Controls whether
907 systemd prints the code location along
908 with log messages. This can be
910 <option>--log-location=</option>.</para></listitem>
914 <term><varname>$XDG_CONFIG_HOME</varname></term>
915 <term><varname>$XDG_CONFIG_DIRS</varname></term>
916 <term><varname>$XDG_DATA_HOME</varname></term>
917 <term><varname>$XDG_DATA_DIRS</varname></term>
919 <listitem><para>The systemd user
920 manager uses these variables in
921 accordance to the <ulink
922 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
923 Base Directory specification</ulink>
924 to find its configuration.</para></listitem>
928 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
930 <listitem><para>Controls where systemd
932 files.</para></listitem>
936 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
938 <listitem><para>Controls where systemd
939 looks for SysV init scripts.</para></listitem>
943 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
945 <listitem><para>Controls where systemd
946 looks for SysV init script runlevel link
947 farms.</para></listitem>
951 <term><varname>$LISTEN_PID</varname></term>
952 <term><varname>$LISTEN_FDS</varname></term>
954 <listitem><para>Set by systemd for
955 supervised processes during
956 socket-based activation. See
957 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
958 for more information.
963 <term><varname>$NOTIFY_SOCKET</varname></term>
965 <listitem><para>Set by systemd for
966 supervised processes for status and
967 start-up completion notification. See
968 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
969 for more information.
976 <title>Kernel Command Line</title>
978 <para>When run as system instance systemd parses a
979 number of kernel command line
980 arguments<footnote><para>If run inside a Linux
981 container these arguments may be passed as command
982 line arguments to systemd itself, next to any of the
983 command line options listed in the Options section
984 above. If run outside of Linux containers, these
985 arguments are parsed from
986 <filename>/proc/cmdline</filename>
987 instead.</para></footnote>:</para>
989 <variablelist class='kernel-commandline-options'>
991 <term><varname>systemd.unit=</varname></term>
992 <term><varname>rd.systemd.unit=</varname></term>
994 <listitem><para>Overrides the unit to
995 activate on boot. Defaults to
996 <filename>default.target</filename>. This
997 may be used to temporarily boot into a
998 different boot unit, for example
999 <filename>rescue.target</filename> or
1000 <filename>emergency.service</filename>. See
1001 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1002 for details about these units. The
1003 option prefixed with
1004 <literal>rd.</literal> is honored
1005 only in the initial RAM disk (initrd),
1006 while the one that is not prefixed only
1007 in the main system.</para></listitem>
1011 <term><varname>systemd.dump_core=</varname></term>
1013 <listitem><para>Takes a boolean
1014 argument. If <option>true</option>,
1015 systemd dumps core when it
1016 crashes. Otherwise, no core dump is
1017 created. Defaults to
1018 <option>true</option>.</para></listitem>
1022 <term><varname>systemd.crash_shell=</varname></term>
1024 <listitem><para>Takes a boolean
1025 argument. If <option>true</option>,
1026 systemd spawns a shell when it
1027 crashes. Otherwise, no shell is
1028 spawned. Defaults to
1029 <option>false</option>, for security
1030 reasons, as the shell is not protected
1032 authentication.</para></listitem>
1036 <term><varname>systemd.crash_chvt=</varname></term>
1038 <listitem><para>Takes an integer
1039 argument. If positive systemd
1040 activates the specified virtual
1041 terminal when it crashes. Defaults to
1042 <constant>-1</constant>.</para></listitem>
1046 <term><varname>systemd.confirm_spawn=</varname></term>
1048 <listitem><para>Takes a boolean
1049 argument. If <option>true</option>,
1050 asks for confirmation when spawning
1051 processes. Defaults to
1052 <option>false</option>.</para></listitem>
1056 <term><varname>systemd.show_status=</varname></term>
1058 <listitem><para>Takes a boolean
1059 argument or the constant
1060 <constant>auto</constant>. If
1061 <option>true</option>, shows terse
1062 service status updates on the console
1064 <constant>auto</constant> behaves like
1065 <option>false</option> until a service
1066 fails or there is a significant delay
1067 in boot. Defaults to
1068 <option>true</option>, unless
1069 <option>quiet</option> is passed as
1070 kernel command line option in which
1072 <constant>auto</constant>.</para></listitem>
1076 <term><varname>systemd.log_target=</varname></term>
1077 <term><varname>systemd.log_level=</varname></term>
1078 <term><varname>systemd.log_color=</varname></term>
1079 <term><varname>systemd.log_location=</varname></term>
1081 <listitem><para>Controls log output,
1082 with the same effect as the
1083 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1084 environment variables described above.</para></listitem>
1088 <term><varname>systemd.default_standard_output=</varname></term>
1089 <term><varname>systemd.default_standard_error=</varname></term>
1090 <listitem><para>Controls default
1091 standard output and error output for
1092 services, with the same effect as the
1093 <option>--default-standard-output=</option>
1094 and <option>--default-standard-error=</option>
1095 command line arguments described
1096 above, respectively.</para></listitem>
1100 <term><varname>systemd.setenv=</varname></term>
1102 <listitem><para>Takes a string
1103 argument in the form VARIABLE=VALUE.
1104 May be used to set default environment
1105 variables to add to forked child processes.
1106 May be used more than once to set multiple
1107 variables.</para></listitem>
1111 <term><varname>quiet</varname></term>
1113 <listitem><para>Turn off
1114 status output at boot, much like
1115 <varname>systemd.show_status=false</varname>
1116 would. Note that this option is also
1117 read by the kernel itself and disables
1118 kernel log output. Passing this option
1119 hence turns off the usual output from
1120 both the system manager and the kernel.
1125 <term><varname>debug</varname></term>
1127 <listitem><para>Turn on debugging
1128 output. This is equivalent to
1129 <varname>systemd.log_level=debug</varname>.
1130 Note that this option is also read by
1131 the kernel itself and enables kernel
1132 debug output. Passing this option
1133 hence turns on the debug output from
1134 both the system manager and the
1135 kernel.</para></listitem>
1139 <term><varname>emergency</varname></term>
1140 <term><varname>-b</varname></term>
1142 <listitem><para>Boot into emergency
1143 mode. This is equivalent to
1144 <varname>systemd.unit=emergency.target</varname>
1145 and provided for compatibility reasons
1147 type.</para></listitem>
1151 <term><varname>rescue</varname></term>
1152 <term><varname>single</varname></term>
1153 <term><varname>s</varname></term>
1154 <term><varname>S</varname></term>
1155 <term><varname>1</varname></term>
1157 <listitem><para>Boot into rescue
1158 mode. This is equivalent to
1159 <varname>systemd.unit=rescue.target</varname>
1160 and provided for compatibility reasons
1162 type.</para></listitem>
1166 <term><varname>2</varname></term>
1167 <term><varname>3</varname></term>
1168 <term><varname>4</varname></term>
1169 <term><varname>5</varname></term>
1171 <listitem><para>Boot into the
1172 specified legacy SysV runlevel. These
1174 <varname>systemd.unit=runlevel2.target</varname>,
1175 <varname>systemd.unit=runlevel3.target</varname>,
1176 <varname>systemd.unit=runlevel4.target</varname>,
1177 and <varname>systemd.unit=runlevel5.target</varname>, respectively,
1178 and provided for compatibility reasons
1180 type.</para></listitem>
1184 <term><varname>locale.LANG=</varname></term>
1185 <term><varname>locale.LANGUAGE=</varname></term>
1186 <term><varname>locale.LC_CTYPE=</varname></term>
1187 <term><varname>locale.LC_NUMERIC=</varname></term>
1188 <term><varname>locale.LC_TIME=</varname></term>
1189 <term><varname>locale.LC_COLLATE=</varname></term>
1190 <term><varname>locale.LC_MONETARY=</varname></term>
1191 <term><varname>locale.LC_MESSAGES=</varname></term>
1192 <term><varname>locale.LC_PAPER=</varname></term>
1193 <term><varname>locale.LC_NAME=</varname></term>
1194 <term><varname>locale.LC_ADDRESS=</varname></term>
1195 <term><varname>locale.LC_TELEPHONE=</varname></term>
1196 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1197 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1199 <listitem><para>Set the system locale
1200 to use. This overrides the settings in
1201 <filename>/etc/locale.conf</filename>. For
1202 more information see
1203 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1205 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1210 <para>For other kernel command line parameters
1211 understood by components of the core OS, please refer
1213 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1217 <title>Sockets and FIFOs</title>
1221 <term><filename>/run/systemd/notify</filename></term>
1223 <listitem><para>Daemon status
1224 notification socket. This is an
1225 <constant>AF_UNIX</constant> datagram socket and is used to
1226 implement the daemon notification
1227 logic as implemented by
1228 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1233 <term><filename>/run/systemd/shutdownd</filename></term>
1235 <listitem><para>Used internally by the
1236 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1237 tool to implement delayed
1238 shutdowns. This is an <constant>AF_UNIX</constant> datagram
1239 socket.</para></listitem>
1243 <term><filename>/run/systemd/private</filename></term>
1245 <listitem><para>Used internally as
1246 communication channel between
1247 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1248 and the systemd process. This is an
1249 <constant>AF_UNIX</constant> stream socket. This interface
1250 is private to systemd and should not
1252 projects.</para></listitem>
1256 <term><filename>/dev/initctl</filename></term>
1258 <listitem><para>Limited compatibility
1259 support for the SysV client interface,
1260 as implemented by the
1261 <filename>systemd-initctl.service</filename>
1262 unit. This is a named pipe in the file
1263 system. This interface is obsolete and
1264 should not be used in new
1265 applications.</para></listitem>
1271 <title>See Also</title>
1273 The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1274 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1275 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1276 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1277 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1278 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1279 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1280 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1281 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1282 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1283 <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1284 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1285 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1286 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>