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 system instance, systemd interprets
79 the configuration file
80 <filename>system.conf</filename>, otherwise
81 <filename>user.conf</filename>. See
82 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83 for more information.</para>
87 <title>Options</title>
89 <para>The following options are understood:</para>
93 <term><option>--test</option></term>
95 <listitem><para>Determine startup
96 sequence, dump it and exit. This is an
97 option useful for debugging
98 only.</para></listitem>
101 <term><option>--dump-configuration-items</option></term>
103 <listitem><para>Dump understood unit
104 configuration items. This outputs a
105 terse but complete list of
106 configuration items understood in unit
107 definition files.</para></listitem>
110 <term><option>--unit=</option></term>
112 <listitem><para>Set default unit to
113 activate on startup. If not specified,
115 <filename>default.target</filename>.</para></listitem>
118 <term><option>--system</option></term>
119 <term><option>--user</option></term>
121 <listitem><para>For <option>--system</option>,
122 tell systemd to run a
123 system instance, even if the process ID is
124 not 1, i.e. systemd is not run as init process.
125 <option>--user</option> does the opposite,
126 running a user instance even if the process
128 Normally it should not be necessary to
129 pass these options, as systemd
130 automatically detects the mode it is
131 started in. These options are hence of
132 little use except for debugging. Note
133 that it is not supported booting and
134 maintaining a full system with systemd
135 running in <option>--system</option>
136 mode, but PID not 1. In practice,
137 passing <option>--system</option> explicitly is
138 only useful in conjunction with
139 <option>--test</option>.</para></listitem>
142 <term><option>--dump-core</option></term>
144 <listitem><para>Dump core on
145 crash. This switch has no effect when
147 instance.</para></listitem>
150 <term><option>--crash-shell</option></term>
152 <listitem><para>Run shell on
153 crash. This switch has no effect when
155 instance.</para></listitem>
158 <term><option>--confirm-spawn</option></term>
160 <listitem><para>Ask for confirmation
161 when spawning processes. This switch
162 has no effect when run as user
163 instance.</para></listitem>
166 <term><option>--show-status=</option></term>
168 <listitem><para>Show terse service
169 status information while booting. This
170 switch has no effect when run as user
171 instance. Takes a boolean argument
172 which may be omitted which is
174 <option>true</option>.</para></listitem>
177 <term><option>--log-target=</option></term>
179 <listitem><para>Set log
180 target. Argument must be one of
181 <option>console</option>,
182 <option>journal</option>,
183 <option>kmsg</option>,
184 <option>journal-or-kmsg</option>,
185 <option>null</option>.</para></listitem>
188 <term><option>--log-level=</option></term>
190 <listitem><para>Set log level. As
191 argument this accepts a numerical log
192 level or the well-known <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
193 symbolic names (lowercase):
194 <option>emerg</option>,
195 <option>alert</option>,
196 <option>crit</option>,
197 <option>err</option>,
198 <option>warning</option>,
199 <option>notice</option>,
200 <option>info</option>,
201 <option>debug</option>.</para></listitem>
204 <term><option>--log-color=</option></term>
206 <listitem><para>Highlight important
207 log messages. Argument is a boolean
208 value. If the argument is omitted, it
210 <option>true</option>.</para></listitem>
213 <term><option>--log-location=</option></term>
215 <listitem><para>Include code location
216 in log messages. This is mostly
217 relevant for debugging
218 purposes. Argument is a boolean
219 value. If the argument is omitted
221 <option>true</option>.</para></listitem>
224 <term><option>--default-standard-output=</option></term>
225 <term><option>--default-standard-error=</option></term>
227 <listitem><para>Sets the default
228 output or error output for all
229 services and sockets, respectively. That is, controls
231 <option>StandardOutput=</option>
232 and <option>StandardError=</option>
234 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
235 for details). Takes one of
236 <option>inherit</option>,
237 <option>null</option>,
238 <option>tty</option>,
239 <option>journal</option>,
240 <option>journal+console</option>,
241 <option>syslog</option>,
242 <option>syslog+console</option>,
243 <option>kmsg</option>,
244 <option>kmsg+console</option>. If the
246 <option>--default-standard-output=</option>
247 defaults to <option>journal</option>
249 <option>--default-standard-error=</option>
251 <option>inherit</option>.</para></listitem>
254 <xi:include href="standard-options.xml" xpointer="help" />
255 <xi:include href="standard-options.xml" xpointer="version" />
260 <title>Concepts</title>
262 <para>systemd provides a dependency system between
263 various entities called "units" of 12 different
264 types. Units encapsulate various objects that are
265 relevant for system boot-up and maintenance. The
266 majority of units are configured in unit configuration
267 files, whose syntax and basic set of options is
269 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
270 however some are created automatically from other
271 configuration, dynamically from system state or
272 programmatically at runtime. Units may be "active"
273 (meaning started, bound, plugged in, ..., depending on
274 the unit type, see below), or "inactive" (meaning
275 stopped, unbound, unplugged, ...), as well as in the
276 process of being activated or deactivated,
277 i.e. between the two states (these states are called
278 "activating", "deactivating"). A special "failed"
279 state is available as well, which is very similar to
280 "inactive" and is entered when the service failed in
281 some way (process returned error code on exit, or
282 crashed, or an operation timed out). If this state is
283 entered, the cause will be logged, for later
284 reference. Note that the various unit types may have a
285 number of additional substates, which are mapped to
286 the five generalized unit states described
289 <para>The following unit types are available:</para>
292 <listitem><para>Service units, which start and control
293 daemons and the processes they consist of. For
295 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
297 <listitem><para>Socket units, which
298 encapsulate local IPC or network sockets in
299 the system, useful for socket-based
300 activation. For details about socket units see
301 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
302 for details on socket-based activation and
303 other forms of activation, see
304 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
306 <listitem><para>Target units are useful to
307 group units, or provide well-known
308 synchronization points during boot-up, see
309 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
311 <listitem><para>Device units expose kernel
312 devices in systemd and may be used to
313 implement device-based activation. For details
315 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
317 <listitem><para>Mount units control mount
318 points in the file system, for details see
319 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
321 <listitem><para>Automount units provide
322 automount capabilities, for on-demand mounting
323 of file systems as well as parallelized
325 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
327 <listitem><para>Snapshot units can be used to
328 temporarily save the state of the set of
329 systemd units, which later may be restored by
330 activating the saved snapshot unit. For more
332 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
334 <listitem><para>Timer units are useful for
335 triggering activation of other units based on
336 timers. You may find details in
337 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
339 <listitem><para>Swap units are very similar to
340 mount units and encapsulate memory swap
341 partitions or files of the operating
342 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
344 <listitem><para>Path units may be used
345 to activate other services when file system
346 objects change or are modified. See
347 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
349 <listitem><para>Slice units may be used to
350 group units which manage system processes
351 (such as service and scope units) in a
352 hierarchical tree for resource management
354 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
356 <listitem><para>Scope units are similar to
357 service units, but manage foreign processes
358 instead of starting them as well. See
359 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
363 <para>Units are named as their configuration
364 files. Some units have special semantics. A detailed
366 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
368 <para>systemd knows various kinds of dependencies,
369 including positive and negative requirement
370 dependencies (i.e. <varname>Requires=</varname> and
371 <varname>Conflicts=</varname>) as well as ordering
372 dependencies (<varname>After=</varname> and
373 <varname>Before=</varname>). NB: ordering and
374 requirement dependencies are orthogonal. If only a
375 requirement dependency exists between two units
376 (e.g. <filename>foo.service</filename> requires
377 <filename>bar.service</filename>), but no ordering
378 dependency (e.g. <filename>foo.service</filename>
379 after <filename>bar.service</filename>) and both are
380 requested to start, they will be started in
381 parallel. It is a common pattern that both requirement
382 and ordering dependencies are placed between two
383 units. Also note that the majority of dependencies are
384 implicitly created and maintained by systemd. In most
385 cases, it should be unnecessary to declare additional
386 dependencies manually, however it is possible to do
389 <para>Application programs and units (via
390 dependencies) may request state changes of units. In
391 systemd, these requests are encapsulated as 'jobs' and
392 maintained in a job queue. Jobs may succeed or can
393 fail, their execution is ordered based on the ordering
394 dependencies of the units they have been scheduled
397 <para>On boot systemd activates the target unit
398 <filename>default.target</filename> whose job is to
399 activate on-boot services and other on-boot units by
400 pulling them in via dependencies. Usually the unit
401 name is just an alias (symlink) for either
402 <filename>graphical.target</filename> (for
403 fully-featured boots into the UI) or
404 <filename>multi-user.target</filename> (for limited
405 console-only boots for use in embedded or server
406 environments, or similar; a subset of
407 graphical.target). However, it is at the discretion of
408 the administrator to configure it as an alias to any
409 other target unit. See
410 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
411 for details about these target units.</para>
413 <para>Processes systemd spawns are placed in
414 individual Linux control groups named after the unit
415 which they belong to in the private systemd
416 hierarchy. (see <ulink
417 url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
418 for more information about control groups, or short
419 "cgroups"). systemd uses this to effectively keep
420 track of processes. Control group information is
421 maintained in the kernel, and is accessible via the
422 file system hierarchy (beneath
423 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
425 <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
426 (<command>ps xawf -eo pid,user,cgroup,args</command>
427 is particularly useful to list all processes and the
428 systemd units they belong to.).</para>
430 <para>systemd is compatible with the SysV init system
431 to a large degree: SysV init scripts are supported and
432 simply read as an alternative (though limited)
433 configuration file format. The SysV
434 <filename>/dev/initctl</filename> interface is
435 provided, and compatibility implementations of the
436 various SysV client tools are available. In addition to
437 that, various established Unix functionality such as
438 <filename>/etc/fstab</filename> or the
439 <filename>utmp</filename> database are
442 <para>systemd has a minimal transaction system: if a
443 unit is requested to start up or shut down it will add
444 it and all its dependencies to a temporary
445 transaction. Then, it will verify if the transaction
446 is consistent (i.e. whether the ordering of all units
447 is cycle-free). If it is not, systemd will try to fix
448 it up, and removes non-essential jobs from the
449 transaction that might remove the loop. Also, systemd
450 tries to suppress non-essential jobs in the
451 transaction that would stop a running service. Finally
452 it is checked whether the jobs of the transaction
453 contradict jobs that have already been queued, and
454 optionally the transaction is aborted then. If all
455 worked out and the transaction is consistent and
456 minimized in its impact it is merged with all already
457 outstanding jobs and added to the run
458 queue. Effectively this means that before executing a
459 requested operation, systemd will verify that it makes
460 sense, fixing it if possible, and only failing if it
461 really cannot work.</para>
463 <para>Systemd contains native implementations of
464 various tasks that need to be executed as part of the
465 boot process. For example, it sets the hostname or
466 configures the loopback network device. It also sets
467 up and mounts various API file systems, such as
468 <filename>/sys</filename> or
469 <filename>/proc</filename>.</para>
471 <para>For more information about the concepts and
472 ideas behind systemd, please refer to the <ulink
473 url="http://0pointer.de/blog/projects/systemd.html">Original
474 Design Document</ulink>.</para>
476 <para>Note that some but not all interfaces provided
477 by systemd are covered by the <ulink
478 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
479 Stability Promise</ulink>.</para>
481 <para>Units may be generated dynamically at boot and
482 system manager reload time, for example based on other
483 configuration files or parameters passed on the kernel
484 command line. For details see the <ulink
485 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
486 Specification</ulink>.</para>
488 <para>Systems which invoke systemd in a container
489 or initrd environment should implement the
491 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
492 Interface</ulink> or <ulink
493 url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd
494 Interface</ulink> specifications, respectively.</para>
498 <title>Directories</title>
502 <term>System unit directories</term>
504 <listitem><para>The systemd system
505 manager reads unit configuration from
506 various directories. Packages that
507 want to install unit files shall place
508 them in the directory returned by
509 <command>pkg-config systemd
510 --variable=systemdsystemunitdir</command>. Other
511 directories checked are
512 <filename>/usr/local/lib/systemd/system</filename>
514 <filename>/usr/lib/systemd/system</filename>. User
515 configuration always takes
516 precedence. <command>pkg-config
518 --variable=systemdsystemconfdir</command>
519 returns the path of the system
520 configuration directory. Packages
521 should alter the content of these
522 directories only with the
523 <command>enable</command> and
524 <command>disable</command> commands of
526 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
527 tool. Full list of directories is provided in
528 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
535 <term>User unit directories</term>
537 <listitem><para>Similar rules apply
539 directories. However, here the <ulink
540 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
541 Base Directory specification</ulink>
543 units. Applications should place their
544 unit files in the directory returned
545 by <command>pkg-config systemd
546 --variable=systemduserunitdir</command>. Global
547 configuration is done in the directory
548 reported by <command>pkg-config
550 --variable=systemduserconfdir</command>. The
551 <command>enable</command> and
552 <command>disable</command> commands of
554 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
555 tool can handle both global (i.e. for
556 all users) and private (for one user)
557 enabling/disabling of
558 units. Full list of directories is provided in
559 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
566 <term>SysV init scripts directory</term>
568 <listitem><para>The location of the
569 SysV init script directory varies
570 between distributions. If systemd
571 cannot find a native unit file for a
572 requested service, it will look for a
573 SysV init script of the same name
575 <filename>.service</filename> suffix
576 removed).</para></listitem>
582 <term>SysV runlevel link farm directory</term>
584 <listitem><para>The location of the
585 SysV runlevel link farm directory
586 varies between distributions. systemd
587 will take the link farm into account
588 when figuring out whether a service
589 shall be enabled. Note that a service
590 unit with a native unit configuration
591 file cannot be started by activating it
592 in the SysV runlevel link
593 farm.</para></listitem>
599 <title>Signals</title>
603 <term><constant>SIGTERM</constant></term>
605 <listitem><para>Upon receiving this
606 signal the systemd system manager
607 serializes its state, reexecutes
608 itself and deserializes the saved
609 state again. This is mostly equivalent
610 to <command>systemctl
611 daemon-reexec</command>.</para>
613 <para>systemd user managers will
615 <filename>exit.target</filename> unit
616 when this signal is received. This is
618 <command>systemctl --user start
619 exit.target</command>.</para></listitem>
623 <term><constant>SIGINT</constant></term>
625 <listitem><para>Upon receiving this
626 signal the systemd system manager will
628 <filename>ctrl-alt-del.target</filename> unit. This
629 is mostly equivalent to
630 <command>systemctl start
631 ctl-alt-del.target</command>.</para>
633 <para>systemd user managers
634 treat this signal the same way as
635 <constant>SIGTERM</constant>.</para></listitem>
639 <term><constant>SIGWINCH</constant></term>
641 <listitem><para>When this signal is
642 received the systemd system manager
644 <filename>kbrequest.target</filename>
645 unit. This is mostly equivalent to
646 <command>systemctl start
647 kbrequest.target</command>.</para>
649 <para>This signal is ignored by
651 managers.</para></listitem>
655 <term><constant>SIGPWR</constant></term>
657 <listitem><para>When this signal is
658 received the systemd manager
660 <filename>sigpwr.target</filename>
661 unit. This is mostly equivalent to
662 <command>systemctl start
663 sigpwr.target</command>.</para></listitem>
667 <term><constant>SIGUSR1</constant></term>
669 <listitem><para>When this signal is
670 received the systemd manager will try
671 to reconnect to the D-Bus
672 bus.</para></listitem>
676 <term><constant>SIGUSR2</constant></term>
678 <listitem><para>When this signal is
679 received the systemd manager will log
680 its complete state in human readable
681 form. The data logged is the same as
682 printed by <command>systemctl
683 dump</command>.</para></listitem>
687 <term><constant>SIGHUP</constant></term>
689 <listitem><para>Reloads the complete
690 daemon configuration. This is mostly
691 equivalent to <command>systemctl
692 daemon-reload</command>.</para></listitem>
696 <term><constant>SIGRTMIN+0</constant></term>
698 <listitem><para>Enters default mode, starts the
699 <filename>default.target</filename>
700 unit. This is mostly equivalent to
701 <command>systemctl start
702 default.target</command>.</para></listitem>
706 <term><constant>SIGRTMIN+1</constant></term>
708 <listitem><para>Enters rescue mode,
710 <filename>rescue.target</filename>
711 unit. This is mostly equivalent to
712 <command>systemctl isolate
713 rescue.target</command>.</para></listitem>
717 <term><constant>SIGRTMIN+2</constant></term>
719 <listitem><para>Enters emergency mode,
721 <filename>emergency.service</filename>
722 unit. This is mostly equivalent to
723 <command>systemctl isolate
724 emergency.service</command>.</para></listitem>
728 <term><constant>SIGRTMIN+3</constant></term>
730 <listitem><para>Halts the machine,
732 <filename>halt.target</filename>
733 unit. This is mostly equivalent to
734 <command>systemctl start
735 halt.target</command>.</para></listitem>
739 <term><constant>SIGRTMIN+4</constant></term>
741 <listitem><para>Powers off the machine,
743 <filename>poweroff.target</filename>
744 unit. This is mostly equivalent to
745 <command>systemctl start
746 poweroff.target</command>.</para></listitem>
750 <term><constant>SIGRTMIN+5</constant></term>
752 <listitem><para>Reboots the machine,
754 <filename>reboot.target</filename>
755 unit. This is mostly equivalent to
756 <command>systemctl start
757 reboot.target</command>.</para></listitem>
761 <term><constant>SIGRTMIN+6</constant></term>
763 <listitem><para>Reboots the machine via kexec,
765 <filename>kexec.target</filename>
766 unit. This is mostly equivalent to
767 <command>systemctl start
768 kexec.target</command>.</para></listitem>
772 <term><constant>SIGRTMIN+13</constant></term>
774 <listitem><para>Immediately halts the machine.</para></listitem>
778 <term><constant>SIGRTMIN+14</constant></term>
780 <listitem><para>Immediately powers off the machine.</para></listitem>
784 <term><constant>SIGRTMIN+15</constant></term>
786 <listitem><para>Immediately reboots the machine.</para></listitem>
790 <term><constant>SIGRTMIN+16</constant></term>
792 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
796 <term><constant>SIGRTMIN+20</constant></term>
798 <listitem><para>Enables display of
799 status messages on the console, as
801 <varname>systemd.show_status=1</varname>
802 on the kernel command
803 line.</para></listitem>
807 <term><constant>SIGRTMIN+21</constant></term>
809 <listitem><para>Disables display of
810 status messages on the console, as
812 <varname>systemd.show_status=0</varname>
813 on the kernel command
814 line.</para></listitem>
818 <term><constant>SIGRTMIN+22</constant></term>
819 <term><constant>SIGRTMIN+23</constant></term>
821 <listitem><para>Sets the log level to
822 <literal>debug</literal>
823 (or <literal>info</literal> on
824 <constant>SIGRTMIN+23</constant>), as
826 <varname>systemd.log_level=debug</varname>
827 (or <varname>systemd.log_level=info</varname>
828 on <constant>SIGRTMIN+23</constant>) on
830 line.</para></listitem>
834 <term><constant>SIGRTMIN+24</constant></term>
836 <listitem><para>Immediately exits the
837 manager (only available for --user
838 instances).</para></listitem>
842 <term><constant>SIGRTMIN+26</constant></term>
843 <term><constant>SIGRTMIN+27</constant></term>
844 <term><constant>SIGRTMIN+28</constant></term>
846 <listitem><para>Sets the log level to
847 <literal>journal-or-kmsg</literal> (or
848 <literal>console</literal> on
849 <constant>SIGRTMIN+27</constant>,
850 <literal>kmsg</literal> on
851 <constant>SIGRTMIN+28</constant>), as
853 <varname>systemd.log_target=journal-or-kmsg</varname>
855 <varname>systemd.log_target=console</varname>
856 on <constant>SIGRTMIN+27</constant> or
857 <varname>systemd.log_target=kmsg</varname>
858 on <constant>SIGRTMIN+28</constant>)
859 on the kernel command
860 line.</para></listitem>
866 <title>Environment</title>
868 <variablelist class='environment-variables'>
870 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
871 <listitem><para>systemd reads the
872 log level from this environment
873 variable. This can be overridden with
874 <option>--log-level=</option>.</para></listitem>
878 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
879 <listitem><para>systemd reads the
880 log target from this environment
881 variable. This can be overridden with
882 <option>--log-target=</option>.</para></listitem>
886 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
887 <listitem><para>Controls whether
888 systemd highlights important log
889 messages. This can be overridden with
890 <option>--log-color=</option>.</para></listitem>
894 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
895 <listitem><para>Controls whether
896 systemd prints the code location along
897 with log messages. This can be
899 <option>--log-location=</option>.</para></listitem>
903 <term><varname>$XDG_CONFIG_HOME</varname></term>
904 <term><varname>$XDG_CONFIG_DIRS</varname></term>
905 <term><varname>$XDG_DATA_HOME</varname></term>
906 <term><varname>$XDG_DATA_DIRS</varname></term>
908 <listitem><para>The systemd user
909 manager uses these variables in
910 accordance to the <ulink
911 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
912 Base Directory specification</ulink>
913 to find its configuration.</para></listitem>
917 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
919 <listitem><para>Controls where systemd
921 files.</para></listitem>
925 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
927 <listitem><para>Controls where systemd
928 looks for SysV init scripts.</para></listitem>
932 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
934 <listitem><para>Controls where systemd
935 looks for SysV init script runlevel link
936 farms.</para></listitem>
940 <term><varname>$LISTEN_PID</varname></term>
941 <term><varname>$LISTEN_FDS</varname></term>
943 <listitem><para>Set by systemd for
944 supervised processes during
945 socket-based activation. See
946 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
947 for more information.
952 <term><varname>$NOTIFY_SOCKET</varname></term>
954 <listitem><para>Set by systemd for
955 supervised processes for status and
956 start-up completion notification. See
957 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
958 for more information.
965 <title>Kernel Command Line</title>
967 <para>When run as system instance systemd parses a
968 number of kernel command line
969 arguments<footnote><para>If run inside a Linux
970 container these arguments may be passed as command
971 line arguments to systemd itself, next to any of the
972 command line options listed in the Options section
973 above. If run outside of Linux containers, these
974 arguments are parsed from
975 <filename>/proc/cmdline</filename>
976 instead.</para></footnote>:</para>
978 <variablelist class='kernel-commandline-options'>
980 <term><varname>systemd.unit=</varname></term>
981 <term><varname>rd.systemd.unit=</varname></term>
983 <listitem><para>Overrides the unit to
984 activate on boot. Defaults to
985 <filename>default.target</filename>. This
986 may be used to temporarily boot into a
987 different boot unit, for example
988 <filename>rescue.target</filename> or
989 <filename>emergency.service</filename>. See
990 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
991 for details about these units. The
993 <literal>rd.</literal> is honored
994 only in the initial RAM disk (initrd),
995 while the one that is not prefixed only
996 in the main system.</para></listitem>
1000 <term><varname>systemd.dump_core=</varname></term>
1002 <listitem><para>Takes a boolean
1003 argument. If <option>true</option>,
1004 systemd dumps core when it
1005 crashes. Otherwise, no core dump is
1006 created. Defaults to
1007 <option>true</option>.</para></listitem>
1011 <term><varname>systemd.crash_shell=</varname></term>
1013 <listitem><para>Takes a boolean
1014 argument. If <option>true</option>,
1015 systemd spawns a shell when it
1016 crashes. Otherwise, no shell is
1017 spawned. Defaults to
1018 <option>false</option>, for security
1019 reasons, as the shell is not protected
1021 authentication.</para></listitem>
1025 <term><varname>systemd.crash_chvt=</varname></term>
1027 <listitem><para>Takes an integer
1028 argument. If positive systemd
1029 activates the specified virtual
1030 terminal when it crashes. Defaults to
1031 <constant>-1</constant>.</para></listitem>
1035 <term><varname>systemd.confirm_spawn=</varname></term>
1037 <listitem><para>Takes a boolean
1038 argument. If <option>true</option>,
1039 asks for confirmation when spawning
1040 processes. Defaults to
1041 <option>false</option>.</para></listitem>
1045 <term><varname>systemd.show_status=</varname></term>
1047 <listitem><para>Takes a boolean
1048 argument or the constant
1049 <constant>auto</constant>. If
1050 <option>true</option>, shows terse
1051 service status updates on the console
1053 <constant>auto</constant> behaves like
1054 <option>false</option> until a service
1055 fails or there is a significant delay
1056 in boot. Defaults to
1057 <option>true</option>, unless
1058 <option>quiet</option> is passed as
1059 kernel command line option in which
1061 <constant>auto</constant>.</para></listitem>
1065 <term><varname>systemd.log_target=</varname></term>
1066 <term><varname>systemd.log_level=</varname></term>
1067 <term><varname>systemd.log_color=</varname></term>
1068 <term><varname>systemd.log_location=</varname></term>
1070 <listitem><para>Controls log output,
1071 with the same effect as the
1072 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1073 environment variables described above.</para></listitem>
1077 <term><varname>systemd.default_standard_output=</varname></term>
1078 <term><varname>systemd.default_standard_error=</varname></term>
1079 <listitem><para>Controls default
1080 standard output and error output for
1081 services, with the same effect as the
1082 <option>--default-standard-output=</option>
1083 and <option>--default-standard-error=</option>
1084 command line arguments described
1085 above, respectively.</para></listitem>
1089 <term><varname>systemd.setenv=</varname></term>
1091 <listitem><para>Takes a string
1092 argument in the form VARIABLE=VALUE.
1093 May be used to set default environment
1094 variables to add to forked child processes.
1095 May be used more than once to set multiple
1096 variables.</para></listitem>
1100 <term><varname>quiet</varname></term>
1102 <listitem><para>Turn off
1103 status output at boot, much like
1104 <varname>systemd.show_status=false</varname>
1105 would. Note that this option is also
1106 read by the kernel itself and disables
1107 kernel log output. Passing this option
1108 hence turns off the usual output from
1109 both the system manager and the kernel.
1114 <term><varname>debug</varname></term>
1116 <listitem><para>Turn on debugging
1117 output. This is equivalent to
1118 <varname>systemd.log_level=debug</varname>.
1119 Note that this option is also read by
1120 the kernel itself and enables kernel
1121 debug output. Passing this option
1122 hence turns on the debug output from
1123 both the system manager and the
1124 kernel.</para></listitem>
1128 <term><varname>emergency</varname></term>
1129 <term><varname>-b</varname></term>
1131 <listitem><para>Boot into emergency
1132 mode. This is equivalent to
1133 <varname>systemd.unit=emergency.target</varname>
1134 and provided for compatibility reasons
1136 type.</para></listitem>
1140 <term><varname>rescue</varname></term>
1141 <term><varname>single</varname></term>
1142 <term><varname>s</varname></term>
1143 <term><varname>S</varname></term>
1144 <term><varname>1</varname></term>
1146 <listitem><para>Boot into rescue
1147 mode. This is equivalent to
1148 <varname>systemd.unit=rescue.target</varname>
1149 and provided for compatibility reasons
1151 type.</para></listitem>
1155 <term><varname>2</varname></term>
1156 <term><varname>3</varname></term>
1157 <term><varname>4</varname></term>
1158 <term><varname>5</varname></term>
1160 <listitem><para>Boot into the
1161 specified legacy SysV runlevel. These
1163 <varname>systemd.unit=runlevel2.target</varname>,
1164 <varname>systemd.unit=runlevel3.target</varname>,
1165 <varname>systemd.unit=runlevel4.target</varname>,
1166 and <varname>systemd.unit=runlevel5.target</varname>, respectively,
1167 and provided for compatibility reasons
1169 type.</para></listitem>
1173 <term><varname>locale.LANG=</varname></term>
1174 <term><varname>locale.LANGUAGE=</varname></term>
1175 <term><varname>locale.LC_CTYPE=</varname></term>
1176 <term><varname>locale.LC_NUMERIC=</varname></term>
1177 <term><varname>locale.LC_TIME=</varname></term>
1178 <term><varname>locale.LC_COLLATE=</varname></term>
1179 <term><varname>locale.LC_MONETARY=</varname></term>
1180 <term><varname>locale.LC_MESSAGES=</varname></term>
1181 <term><varname>locale.LC_PAPER=</varname></term>
1182 <term><varname>locale.LC_NAME=</varname></term>
1183 <term><varname>locale.LC_ADDRESS=</varname></term>
1184 <term><varname>locale.LC_TELEPHONE=</varname></term>
1185 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1186 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1188 <listitem><para>Set the system locale
1189 to use. This overrides the settings in
1190 <filename>/etc/locale.conf</filename>. For
1191 more information see
1192 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1194 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1199 <para>For other kernel command line parameters
1200 understood by components of the core OS, please refer
1202 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1206 <title>Sockets and FIFOs</title>
1210 <term><filename>/run/systemd/notify</filename></term>
1212 <listitem><para>Daemon status
1213 notification socket. This is an
1214 <constant>AF_UNIX</constant> datagram socket and is used to
1215 implement the daemon notification
1216 logic as implemented by
1217 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1222 <term><filename>/run/systemd/shutdownd</filename></term>
1224 <listitem><para>Used internally by the
1225 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1226 tool to implement delayed
1227 shutdowns. This is an <constant>AF_UNIX</constant> datagram
1228 socket.</para></listitem>
1232 <term><filename>/run/systemd/private</filename></term>
1234 <listitem><para>Used internally as
1235 communication channel between
1236 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1237 and the systemd process. This is an
1238 <constant>AF_UNIX</constant> stream socket. This interface
1239 is private to systemd and should not
1241 projects.</para></listitem>
1245 <term><filename>/dev/initctl</filename></term>
1247 <listitem><para>Limited compatibility
1248 support for the SysV client interface,
1249 as implemented by the
1250 <filename>systemd-initctl.service</filename>
1251 unit. This is a named pipe in the file
1252 system. This interface is obsolete and
1253 should not be used in new
1254 applications.</para></listitem>
1260 <title>See Also</title>
1262 The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1263 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1264 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1265 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1266 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1267 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1268 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1269 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1270 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1271 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1272 <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1273 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1274 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1275 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>