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 Linux operating
65 systems. When run as first process on boot (as PID 1), it acts as
66 init system that brings up and maintains userspace
69 <para>For compatibility with SysV, if systemd is called as
70 <command>init</command> and a PID that is not 1, it will execute
71 <command>telinit</command> and pass all command line arguments
72 unmodified. That means <command>init</command> and
73 <command>telinit</command> are mostly equivalent when invoked from
74 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 files
80 in <filename>system.conf.d</filename> directories; when run as a
81 user instance, systemd interprets the configuration file
82 <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 sequence, dump it and exit.
98 This is an option useful for debugging only.</para></listitem>
101 <term><option>--dump-configuration-items</option></term>
103 <listitem><para>Dump understood unit configuration items. This
104 outputs a terse but complete list of configuration items
105 understood in unit definition files.</para></listitem>
108 <term><option>--unit=</option></term>
110 <listitem><para>Set default unit to activate on startup. If
111 not specified, defaults to
112 <filename>default.target</filename>.</para></listitem>
115 <term><option>--system</option></term>
116 <term><option>--user</option></term>
118 <listitem><para>For <option>--system</option>, tell systemd to
119 run a system instance, even if the process ID is not 1, i.e.
120 systemd is not run as init process. <option>--user</option>
121 does the opposite, running a user instance even if the process
122 ID is 1. Normally it should not be necessary to pass these
123 options, as systemd automatically detects the mode it is
124 started in. These options are hence of little use except for
125 debugging. Note that it is not supported booting and
126 maintaining a full system with systemd running in
127 <option>--system</option> mode, but PID not 1. In practice,
128 passing <option>--system</option> explicitly is only useful in
129 conjunction with <option>--test</option>.</para></listitem>
132 <term><option>--dump-core</option></term>
134 <listitem><para>Dump core on crash. This switch has no effect
135 when run as user instance.</para></listitem>
138 <term><option>--crash-shell</option></term>
140 <listitem><para>Run shell on
141 crash. This switch has no effect when
143 instance.</para></listitem>
146 <term><option>--confirm-spawn</option></term>
148 <listitem><para>Ask for confirmation when spawning processes.
149 This switch has no effect when run as user
150 instance.</para></listitem>
153 <term><option>--show-status=</option></term>
155 <listitem><para>Show terse service status information while
156 booting. This switch has no effect when run as user instance.
157 Takes a boolean argument which may be omitted which is
158 interpreted as <option>true</option>.</para></listitem>
161 <term><option>--log-target=</option></term>
163 <listitem><para>Set log target. Argument must be one of
164 <option>console</option>,
165 <option>journal</option>,
166 <option>kmsg</option>,
167 <option>journal-or-kmsg</option>,
168 <option>null</option>.</para></listitem>
171 <term><option>--log-level=</option></term>
173 <listitem><para>Set log level. As
174 argument this accepts a numerical log
175 level or the well-known <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
176 symbolic names (lowercase):
177 <option>emerg</option>,
178 <option>alert</option>,
179 <option>crit</option>,
180 <option>err</option>,
181 <option>warning</option>,
182 <option>notice</option>,
183 <option>info</option>,
184 <option>debug</option>.</para></listitem>
187 <term><option>--log-color=</option></term>
189 <listitem><para>Highlight important log messages. Argument is
190 a boolean value. If the argument is omitted, it defaults to
191 <option>true</option>.</para></listitem>
194 <term><option>--log-location=</option></term>
196 <listitem><para>Include code location in log messages. This is
197 mostly relevant for debugging purposes. Argument is a boolean
198 value. If the argument is omitted it defaults to
199 <option>true</option>.</para></listitem>
202 <term><option>--default-standard-output=</option></term>
203 <term><option>--default-standard-error=</option></term>
205 <listitem><para>Sets the default output or error output for
206 all services and sockets, respectively. That is, controls the
207 default for <option>StandardOutput=</option> and
208 <option>StandardError=</option> (see
209 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
210 for details). Takes one of
211 <option>inherit</option>,
212 <option>null</option>,
213 <option>tty</option>,
214 <option>journal</option>,
215 <option>journal+console</option>,
216 <option>syslog</option>,
217 <option>syslog+console</option>,
218 <option>kmsg</option>,
219 <option>kmsg+console</option>. If the
221 <option>--default-standard-output=</option> defaults to
222 <option>journal</option> and
223 <option>--default-standard-error=</option> to
224 <option>inherit</option>.</para></listitem>
227 <xi:include href="standard-options.xml" xpointer="help" />
228 <xi:include href="standard-options.xml" xpointer="version" />
233 <title>Concepts</title>
235 <para>systemd provides a dependency system between various
236 entities called "units" of 12 different types. Units encapsulate
237 various objects that are relevant for system boot-up and
238 maintenance. The majority of units are configured in unit
239 configuration files, whose syntax and basic set of options is
241 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
242 however some are created automatically from other configuration,
243 dynamically from system state or programmatically at runtime.
244 Units may be "active" (meaning started, bound, plugged in, ...,
245 depending on the unit type, see below), or "inactive" (meaning
246 stopped, unbound, unplugged, ...), as well as in the process of
247 being activated or deactivated, i.e. between the two states (these
248 states are called "activating", "deactivating"). A special
249 "failed" state is available as well, which is very similar to
250 "inactive" and is entered when the service failed in some way
251 (process returned error code on exit, or crashed, or an operation
252 timed out). If this state is entered, the cause will be logged,
253 for later reference. Note that the various unit types may have a
254 number of additional substates, which are mapped to the five
255 generalized unit states described here.</para>
257 <para>The following unit types are available:</para>
260 <listitem><para>Service units, which start and control daemons
261 and the processes they consist of. For details see
262 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
264 <listitem><para>Socket units, which encapsulate local IPC or
265 network sockets in the system, useful for socket-based
266 activation. For details about socket units see
267 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
268 for details on socket-based activation and other forms of
270 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
272 <listitem><para>Target units are useful to group units, or
273 provide well-known synchronization points during boot-up, see
274 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
276 <listitem><para>Device units expose kernel devices in systemd
277 and may be used to implement device-based activation. For
279 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
281 <listitem><para>Mount units control mount points in the file
282 system, for details see
283 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
285 <listitem><para>Automount units provide automount capabilities,
286 for on-demand mounting of file systems as well as parallelized
288 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
290 <listitem><para>Snapshot units can be used to temporarily save
291 the state of the set of systemd units, which later may be
292 restored by activating the saved snapshot unit. For more
294 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
296 <listitem><para>Timer units are useful for triggering activation
297 of other units based on timers. You may find details in
298 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
300 <listitem><para>Swap units are very similar to mount units and
301 encapsulate memory swap partitions or files of the operating
302 system. They are described in
303 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
305 <listitem><para>Path units may be used to activate other
306 services when file system objects change or are modified. See
307 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
309 <listitem><para>Slice units may be used to group units which
310 manage system processes (such as service and scope units) in a
311 hierarchical tree for resource management purposes. See
312 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
314 <listitem><para>Scope units are similar to service units, but
315 manage foreign processes instead of starting them as well. See
316 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
320 <para>Units are named as their configuration files. Some units
321 have special semantics. A detailed list is available in
322 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
324 <para>systemd knows various kinds of dependencies, including
325 positive and negative requirement dependencies (i.e.
326 <varname>Requires=</varname> and <varname>Conflicts=</varname>) as
327 well as ordering dependencies (<varname>After=</varname> and
328 <varname>Before=</varname>). NB: ordering and requirement
329 dependencies are orthogonal. If only a requirement dependency
330 exists between two units (e.g. <filename>foo.service</filename>
331 requires <filename>bar.service</filename>), but no ordering
332 dependency (e.g. <filename>foo.service</filename> after
333 <filename>bar.service</filename>) and both are requested to start,
334 they will be started in parallel. It is a common pattern that both
335 requirement and ordering dependencies are placed between two
336 units. Also note that the majority of dependencies are implicitly
337 created and maintained by systemd. In most cases, it should be
338 unnecessary to declare additional dependencies manually, however
339 it is possible to do this.</para>
341 <para>Application programs and units (via dependencies) may
342 request state changes of units. In systemd, these requests are
343 encapsulated as 'jobs' and maintained in a job queue. Jobs may
344 succeed or can fail, their execution is ordered based on the
345 ordering dependencies of the units they have been scheduled
348 <para>On boot systemd activates the target unit
349 <filename>default.target</filename> whose job is to activate
350 on-boot services and other on-boot units by pulling them in via
351 dependencies. Usually the unit name is just an alias (symlink) for
352 either <filename>graphical.target</filename> (for fully-featured
353 boots into the UI) or <filename>multi-user.target</filename> (for
354 limited console-only boots for use in embedded or server
355 environments, or similar; a subset of graphical.target). However,
356 it is at the discretion of the administrator to configure it as an
357 alias to any other target unit. See
358 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
359 for details about these target units.</para>
361 <para>Processes systemd spawns are placed in individual Linux
362 control groups named after the unit which they belong to in the
363 private systemd hierarchy. (see <ulink
364 url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
365 for more information about control groups, or short "cgroups").
366 systemd uses this to effectively keep track of processes. Control
367 group information is maintained in the kernel, and is accessible
368 via the file system hierarchy (beneath
369 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools such as
370 <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
371 (<command>ps xawf -eo pid,user,cgroup,args</command> is
372 particularly useful to list all processes and the systemd units
373 they belong to.).</para>
375 <para>systemd is compatible with the SysV init system to a large
376 degree: SysV init scripts are supported and simply read as an
377 alternative (though limited) configuration file format. The SysV
378 <filename>/dev/initctl</filename> interface is provided, and
379 compatibility implementations of the various SysV client tools are
380 available. In addition to that, various established Unix
381 functionality such as <filename>/etc/fstab</filename> or the
382 <filename>utmp</filename> database are supported.</para>
384 <para>systemd has a minimal transaction system: if a unit is
385 requested to start up or shut down it will add it and all its
386 dependencies to a temporary transaction. Then, it will verify if
387 the transaction is consistent (i.e. whether the ordering of all
388 units is cycle-free). If it is not, systemd will try to fix it up,
389 and removes non-essential jobs from the transaction that might
390 remove the loop. Also, systemd tries to suppress non-essential
391 jobs in the transaction that would stop a running service. Finally
392 it is checked whether the jobs of the transaction contradict jobs
393 that have already been queued, and optionally the transaction is
394 aborted then. If all worked out and the transaction is consistent
395 and minimized in its impact it is merged with all already
396 outstanding jobs and added to the run queue. Effectively this
397 means that before executing a requested operation, systemd will
398 verify that it makes sense, fixing it if possible, and only
399 failing if it really cannot work.</para>
401 <para>Systemd contains native implementations of various tasks
402 that need to be executed as part of the boot process. For example,
403 it sets the hostname or configures the loopback network device. It
404 also sets up and mounts various API file systems, such as
405 <filename>/sys</filename> or <filename>/proc</filename>.</para>
407 <para>For more information about the concepts and
408 ideas behind systemd, please refer to the
409 <ulink url="http://0pointer.de/blog/projects/systemd.html">Original Design Document</ulink>.</para>
411 <para>Note that some but not all interfaces provided
412 by systemd are covered by the
413 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
414 Stability Promise</ulink>.</para>
416 <para>Units may be generated dynamically at boot and system
417 manager reload time, for example based on other configuration
418 files or parameters passed on the kernel command line. For details see
419 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
421 <para>Systems which invoke systemd in a container or initrd
422 environment should implement the
423 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container Interface</ulink> or
424 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd Interface</ulink>
425 specifications, respectively.</para>
429 <title>Directories</title>
433 <term>System unit directories</term>
435 <listitem><para>The systemd system manager reads unit
436 configuration from various directories. Packages that want to
437 install unit files shall place them in the directory returned
438 by <command>pkg-config systemd
439 --variable=systemdsystemunitdir</command>. Other directories
440 checked are <filename>/usr/local/lib/systemd/system</filename>
441 and <filename>/usr/lib/systemd/system</filename>. User
442 configuration always takes precedence. <command>pkg-config
443 systemd --variable=systemdsystemconfdir</command> returns the
444 path of the system configuration directory. Packages should
445 alter the content of these directories only with the
446 <command>enable</command> and <command>disable</command>
448 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
449 tool. Full list of directories is provided in
450 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
457 <term>User unit directories</term>
459 <listitem><para>Similar rules apply for the user unit
460 directories. However, here the
461 <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
462 Base Directory specification</ulink> is followed to find
463 units. Applications should place their unit files in the
464 directory returned by <command>pkg-config systemd
465 --variable=systemduserunitdir</command>. Global configuration
466 is done in the directory reported by <command>pkg-config
467 systemd --variable=systemduserconfdir</command>. The
468 <command>enable</command> and <command>disable</command>
470 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
471 tool can handle both global (i.e. for all users) and private
472 (for one user) enabling/disabling of units. Full list of
473 directories is provided in
474 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
481 <term>SysV init scripts directory</term>
483 <listitem><para>The location of the SysV init script directory
484 varies between distributions. If systemd cannot find a native
485 unit file for a requested service, it will look for a SysV
486 init script of the same name (with the
487 <filename>.service</filename> suffix
488 removed).</para></listitem>
494 <term>SysV runlevel link farm directory</term>
496 <listitem><para>The location of the SysV runlevel link farm
497 directory varies between distributions. systemd will take the
498 link farm into account when figuring out whether a service
499 shall be enabled. Note that a service unit with a native unit
500 configuration file cannot be started by activating it in the
501 SysV runlevel link farm.</para></listitem>
507 <title>Signals</title>
511 <term><constant>SIGTERM</constant></term>
513 <listitem><para>Upon receiving this signal the systemd system
514 manager serializes its state, reexecutes itself and
515 deserializes the saved state again. This is mostly equivalent
516 to <command>systemctl daemon-reexec</command>.</para>
518 <para>systemd user managers will start the
519 <filename>exit.target</filename> unit when this signal is
520 received. This is mostly equivalent to <command>systemctl
521 --user start exit.target</command>.</para></listitem>
525 <term><constant>SIGINT</constant></term>
527 <listitem><para>Upon receiving this signal the systemd system
528 manager will start the
529 <filename>ctrl-alt-del.target</filename> unit. This is mostly
530 equivalent to <command>systemctl start
531 ctl-alt-del.target</command>. If this signal is received more
532 often than 7 times per 2s an immediate reboot is triggered.
533 Note that pressing Ctrl-Alt-Del on the console will trigger
534 this signal. Hence, if a reboot is hanging pressing
535 Ctrl-Alt-Del more than 7 times in 2s is a relatively safe way
536 to trigger an immediate reboot.</para>
538 <para>systemd user managers treat this signal the same way as
539 <constant>SIGTERM</constant>.</para></listitem>
543 <term><constant>SIGWINCH</constant></term>
545 <listitem><para>When this signal is received the systemd
546 system manager will start the
547 <filename>kbrequest.target</filename> unit. This is mostly
548 equivalent to <command>systemctl start
549 kbrequest.target</command>.</para>
551 <para>This signal is ignored by systemd user
552 managers.</para></listitem>
556 <term><constant>SIGPWR</constant></term>
558 <listitem><para>When this signal is received the systemd
559 manager will start the <filename>sigpwr.target</filename>
560 unit. This is mostly equivalent to <command>systemctl start
561 sigpwr.target</command>.</para></listitem>
565 <term><constant>SIGUSR1</constant></term>
567 <listitem><para>When this signal is received the systemd
568 manager will try to reconnect to the D-Bus
569 bus.</para></listitem>
573 <term><constant>SIGUSR2</constant></term>
575 <listitem><para>When this signal is received the systemd
576 manager will log its complete state in human readable form.
577 The data logged is the same as printed by
578 <command>systemd-analyze dump</command>.</para></listitem>
582 <term><constant>SIGHUP</constant></term>
584 <listitem><para>Reloads the complete daemon configuration.
585 This is mostly equivalent to <command>systemctl
586 daemon-reload</command>.</para></listitem>
590 <term><constant>SIGRTMIN+0</constant></term>
592 <listitem><para>Enters default mode, starts the
593 <filename>default.target</filename> unit. This is mostly
594 equivalent to <command>systemctl start
595 default.target</command>.</para></listitem>
599 <term><constant>SIGRTMIN+1</constant></term>
601 <listitem><para>Enters rescue mode, starts the
602 <filename>rescue.target</filename> unit. This is mostly
603 equivalent to <command>systemctl isolate
604 rescue.target</command>.</para></listitem>
608 <term><constant>SIGRTMIN+2</constant></term>
610 <listitem><para>Enters emergency mode, starts the
611 <filename>emergency.service</filename> unit. This is mostly
612 equivalent to <command>systemctl isolate
613 emergency.service</command>.</para></listitem>
617 <term><constant>SIGRTMIN+3</constant></term>
619 <listitem><para>Halts the machine, starts the
620 <filename>halt.target</filename> unit. This is mostly
621 equivalent to <command>systemctl start
622 halt.target</command>.</para></listitem>
626 <term><constant>SIGRTMIN+4</constant></term>
628 <listitem><para>Powers off the machine, starts the
629 <filename>poweroff.target</filename> unit. This is mostly
630 equivalent to <command>systemctl start
631 poweroff.target</command>.</para></listitem>
635 <term><constant>SIGRTMIN+5</constant></term>
637 <listitem><para>Reboots the machine, starts the
638 <filename>reboot.target</filename> unit. This is mostly
639 equivalent to <command>systemctl start
640 reboot.target</command>.</para></listitem>
644 <term><constant>SIGRTMIN+6</constant></term>
646 <listitem><para>Reboots the machine via kexec, starts the
647 <filename>kexec.target</filename> unit. This is mostly
648 equivalent to <command>systemctl start
649 kexec.target</command>.</para></listitem>
653 <term><constant>SIGRTMIN+13</constant></term>
655 <listitem><para>Immediately halts the machine.</para></listitem>
659 <term><constant>SIGRTMIN+14</constant></term>
661 <listitem><para>Immediately powers off the machine.</para></listitem>
665 <term><constant>SIGRTMIN+15</constant></term>
667 <listitem><para>Immediately reboots the machine.</para></listitem>
671 <term><constant>SIGRTMIN+16</constant></term>
673 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
677 <term><constant>SIGRTMIN+20</constant></term>
679 <listitem><para>Enables display of status messages on the
680 console, as controlled via
681 <varname>systemd.show_status=1</varname> on the kernel command
682 line.</para></listitem>
686 <term><constant>SIGRTMIN+21</constant></term>
688 <listitem><para>Disables display of
689 status messages on the console, as
691 <varname>systemd.show_status=0</varname>
692 on the kernel command
693 line.</para></listitem>
697 <term><constant>SIGRTMIN+22</constant></term>
698 <term><constant>SIGRTMIN+23</constant></term>
700 <listitem><para>Sets the log level to <literal>debug</literal>
701 (or <literal>info</literal> on
702 <constant>SIGRTMIN+23</constant>), as controlled via
703 <varname>systemd.log_level=debug</varname> (or
704 <varname>systemd.log_level=info</varname> on
705 <constant>SIGRTMIN+23</constant>) on the kernel command
706 line.</para></listitem>
710 <term><constant>SIGRTMIN+24</constant></term>
712 <listitem><para>Immediately exits the manager (only available
713 for --user instances).</para></listitem>
717 <term><constant>SIGRTMIN+26</constant></term>
718 <term><constant>SIGRTMIN+27</constant></term>
719 <term><constant>SIGRTMIN+28</constant></term>
721 <listitem><para>Sets the log level to
722 <literal>journal-or-kmsg</literal> (or
723 <literal>console</literal> on
724 <constant>SIGRTMIN+27</constant>, <literal>kmsg</literal> on
725 <constant>SIGRTMIN+28</constant>), as controlled via
726 <varname>systemd.log_target=journal-or-kmsg</varname> (or
727 <varname>systemd.log_target=console</varname> on
728 <constant>SIGRTMIN+27</constant> or
729 <varname>systemd.log_target=kmsg</varname> on
730 <constant>SIGRTMIN+28</constant>) on the kernel command
731 line.</para></listitem>
737 <title>Environment</title>
739 <variablelist class='environment-variables'>
741 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
742 <listitem><para>systemd reads the log level from this
743 environment variable. This can be overridden with
744 <option>--log-level=</option>.</para></listitem>
748 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
749 <listitem><para>systemd reads the log target from this
750 environment variable. This can be overridden with
751 <option>--log-target=</option>.</para></listitem>
755 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
756 <listitem><para>Controls whether systemd highlights important
757 log messages. This can be overridden with
758 <option>--log-color=</option>.</para></listitem>
762 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
763 <listitem><para>Controls whether systemd prints the code
764 location along with log messages. This can be overridden with
765 <option>--log-location=</option>.</para></listitem>
769 <term><varname>$XDG_CONFIG_HOME</varname></term>
770 <term><varname>$XDG_CONFIG_DIRS</varname></term>
771 <term><varname>$XDG_DATA_HOME</varname></term>
772 <term><varname>$XDG_DATA_DIRS</varname></term>
774 <listitem><para>The systemd user manager uses these variables
775 in accordance to the <ulink
776 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
777 Base Directory specification</ulink> to find its
778 configuration.</para></listitem>
782 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
784 <listitem><para>Controls where systemd looks for unit
785 files.</para></listitem>
789 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
791 <listitem><para>Controls where systemd looks for SysV init
792 scripts.</para></listitem>
796 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
798 <listitem><para>Controls where systemd looks for SysV init
799 script runlevel link farms.</para></listitem>
803 <term><varname>$LISTEN_PID</varname></term>
804 <term><varname>$LISTEN_FDS</varname></term>
806 <listitem><para>Set by systemd for supervised processes during
807 socket-based activation. See
808 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
809 for more information. </para></listitem>
813 <term><varname>$NOTIFY_SOCKET</varname></term>
815 <listitem><para>Set by systemd for supervised processes for
816 status and start-up completion notification. See
817 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
818 for more information. </para></listitem>
824 <title>Kernel Command Line</title>
826 <para>When run as system instance systemd parses a number of
827 kernel command line arguments<footnote><para>If run inside a Linux
828 container these arguments may be passed as command line arguments
829 to systemd itself, next to any of the command line options listed
830 in the Options section above. If run outside of Linux containers,
831 these arguments are parsed from <filename>/proc/cmdline</filename>
832 instead.</para></footnote>:</para>
834 <variablelist class='kernel-commandline-options'>
836 <term><varname>systemd.unit=</varname></term>
837 <term><varname>rd.systemd.unit=</varname></term>
839 <listitem><para>Overrides the unit to activate on boot.
840 Defaults to <filename>default.target</filename>. This may be
841 used to temporarily boot into a different boot unit, for
842 example <filename>rescue.target</filename> or
843 <filename>emergency.service</filename>. See
844 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
845 for details about these units. The option prefixed with
846 <literal>rd.</literal> is honored only in the initial RAM disk
847 (initrd), while the one that is not prefixed only in the main
848 system.</para></listitem>
852 <term><varname>systemd.dump_core=</varname></term>
854 <listitem><para>Takes a boolean argument. If
855 <option>true</option>, systemd dumps core when it crashes.
856 Otherwise, no core dump is created. Defaults to
857 <option>true</option>.</para></listitem>
861 <term><varname>systemd.crash_shell=</varname></term>
863 <listitem><para>Takes a boolean argument. If
864 <option>true</option>, systemd spawns a shell when it crashes.
865 Otherwise, no shell is spawned. Defaults to
866 <option>false</option>, for security reasons, as the shell is
867 not protected by any password
868 authentication.</para></listitem>
872 <term><varname>systemd.crash_chvt=</varname></term>
874 <listitem><para>Takes an integer argument. If positive systemd
875 activates the specified virtual terminal when it crashes.
876 Defaults to <constant>-1</constant>.</para></listitem>
880 <term><varname>systemd.confirm_spawn=</varname></term>
882 <listitem><para>Takes a boolean argument. If
883 <option>true</option>, asks for confirmation when spawning
884 processes. Defaults to
885 <option>false</option>.</para></listitem>
889 <term><varname>systemd.show_status=</varname></term>
891 <listitem><para>Takes a boolean argument or the constant
892 <constant>auto</constant>. If <option>true</option>, shows
893 terse service status updates on the console during bootup.
894 <constant>auto</constant> behaves like <option>false</option>
895 until a service fails or there is a significant delay in boot.
896 Defaults to <option>true</option>, unless
897 <option>quiet</option> is passed as kernel command line option
898 in which case it defaults to
899 <constant>auto</constant>.</para></listitem>
903 <term><varname>systemd.log_target=</varname></term>
904 <term><varname>systemd.log_level=</varname></term>
905 <term><varname>systemd.log_color=</varname></term>
906 <term><varname>systemd.log_location=</varname></term>
908 <listitem><para>Controls log output, with the same effect as
909 the <varname>$SYSTEMD_LOG_TARGET</varname>,
910 <varname>$SYSTEMD_LOG_LEVEL</varname>,
911 <varname>$SYSTEMD_LOG_COLOR</varname>,
912 <varname>$SYSTEMD_LOG_LOCATION</varname> environment variables
913 described above.</para></listitem>
917 <term><varname>systemd.default_standard_output=</varname></term>
918 <term><varname>systemd.default_standard_error=</varname></term>
919 <listitem><para>Controls default standard output and error
920 output for services, with the same effect as the
921 <option>--default-standard-output=</option> and
922 <option>--default-standard-error=</option> command line
923 arguments described above, respectively.</para></listitem>
927 <term><varname>systemd.setenv=</varname></term>
929 <listitem><para>Takes a string argument in the form
930 VARIABLE=VALUE. May be used to set default environment
931 variables to add to forked child processes. May be used more
932 than once to set multiple variables.</para></listitem>
936 <term><varname>quiet</varname></term>
938 <listitem><para>Turn off status output at boot, much like
939 <varname>systemd.show_status=false</varname> would. Note that
940 this option is also read by the kernel itself and disables
941 kernel log output. Passing this option hence turns off the
942 usual output from both the system manager and the kernel.
947 <term><varname>debug</varname></term>
949 <listitem><para>Turn on debugging output. This is equivalent
950 to <varname>systemd.log_level=debug</varname>. Note that this
951 option is also read by the kernel itself and enables kernel
952 debug output. Passing this option hence turns on the debug
953 output from both the system manager and the
954 kernel.</para></listitem>
958 <term><varname>emergency</varname></term>
959 <term><varname>-b</varname></term>
961 <listitem><para>Boot into emergency mode. This is equivalent
962 to <varname>systemd.unit=emergency.target</varname> and
963 provided for compatibility reasons and to be easier to
964 type.</para></listitem>
968 <term><varname>rescue</varname></term>
969 <term><varname>single</varname></term>
970 <term><varname>s</varname></term>
971 <term><varname>S</varname></term>
972 <term><varname>1</varname></term>
974 <listitem><para>Boot into rescue mode. This is equivalent to
975 <varname>systemd.unit=rescue.target</varname> and provided for
976 compatibility reasons and to be easier to
977 type.</para></listitem>
981 <term><varname>2</varname></term>
982 <term><varname>3</varname></term>
983 <term><varname>4</varname></term>
984 <term><varname>5</varname></term>
986 <listitem><para>Boot into the specified legacy SysV runlevel.
987 These are equivalent to
988 <varname>systemd.unit=runlevel2.target</varname>,
989 <varname>systemd.unit=runlevel3.target</varname>,
990 <varname>systemd.unit=runlevel4.target</varname>, and
991 <varname>systemd.unit=runlevel5.target</varname>,
992 respectively, and provided for compatibility reasons and to be
993 easier to type.</para></listitem>
997 <term><varname>locale.LANG=</varname></term>
998 <term><varname>locale.LANGUAGE=</varname></term>
999 <term><varname>locale.LC_CTYPE=</varname></term>
1000 <term><varname>locale.LC_NUMERIC=</varname></term>
1001 <term><varname>locale.LC_TIME=</varname></term>
1002 <term><varname>locale.LC_COLLATE=</varname></term>
1003 <term><varname>locale.LC_MONETARY=</varname></term>
1004 <term><varname>locale.LC_MESSAGES=</varname></term>
1005 <term><varname>locale.LC_PAPER=</varname></term>
1006 <term><varname>locale.LC_NAME=</varname></term>
1007 <term><varname>locale.LC_ADDRESS=</varname></term>
1008 <term><varname>locale.LC_TELEPHONE=</varname></term>
1009 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1010 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1012 <listitem><para>Set the system locale to use. This overrides
1013 the settings in <filename>/etc/locale.conf</filename>. For
1014 more information see
1015 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1017 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1022 <para>For other kernel command line parameters understood by
1023 components of the core OS, please refer to
1024 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1028 <title>Sockets and FIFOs</title>
1032 <term><filename>/run/systemd/notify</filename></term>
1034 <listitem><para>Daemon status notification socket. This is an
1035 <constant>AF_UNIX</constant> datagram socket and is used to
1036 implement the daemon notification logic as implemented by
1037 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1042 <term><filename>/run/systemd/shutdownd</filename></term>
1044 <listitem><para>Used internally by the
1045 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1046 tool to implement delayed shutdowns. This is an
1047 <constant>AF_UNIX</constant> datagram
1048 socket.</para></listitem>
1052 <term><filename>/run/systemd/private</filename></term>
1054 <listitem><para>Used internally as communication channel
1056 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1057 and the systemd process. This is an
1058 <constant>AF_UNIX</constant> stream socket. This interface is
1059 private to systemd and should not be used in external
1060 projects.</para></listitem>
1064 <term><filename>/dev/initctl</filename></term>
1066 <listitem><para>Limited compatibility support for the SysV
1067 client interface, as implemented by the
1068 <filename>systemd-initctl.service</filename> unit. This is a
1069 named pipe in the file system. This interface is obsolete and
1070 should not be used in new applications.</para></listitem>
1076 <title>See Also</title>
1078 The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1079 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1080 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1081 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1082 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1083 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1084 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1085 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1086 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1087 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1088 <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1089 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1090 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1091 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>