1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
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>Enable core dumping on crash. This switch has
135 no effect when running as user instance. This setting may also
136 be enabled during boot on the kernel command line via the
137 <varname>systemd.dump_core=
</varname> option, see
138 below.
</para></listitem>
142 <term><option>--crash-vt=
</option><replaceable>VT
</replaceable></term>
144 <listitem><para>Switch to a specific virtual console (VT) on
145 crash. Takes a positive integer in the range
1–
63, or a
146 boolean argument. If an integer is passed, selects which VT to
147 switch to. If
<constant>yes
</constant>, the VT kernel messages
148 are written to is selected. If
<constant>no
</constant>, no VT
149 switch is attempted. This switch has no effect when running as
150 user instance. This setting may also be enabled during boot,
151 on the kernel command line via the
152 <varname>systemd.crash_vt=
</varname> option, see
153 below.
</para></listitem>
157 <term><option>--crash-shell
</option></term>
159 <listitem><para>Run a shell on crash. This switch has no
160 effect when running as user instance. This setting may also be
161 enabled during boot, on the kernel command line via the
162 <varname>systemd.crash_shell=
</varname> option, see
163 below.
</para></listitem>
167 <term><option>--crash-reboot
</option></term>
169 <listitem><para>Automatically reboot the system on crash. This
170 switch has no effect when running as user instance. This
171 setting may also be enabled during boot, on the kernel command
172 line via the
<varname>systemd.crash_reboot=
</varname> option,
173 see below.
</para></listitem>
177 <term><option>--confirm-spawn
</option></term>
179 <listitem><para>Ask for confirmation when spawning processes.
180 This switch has no effect when run as user
181 instance.
</para></listitem>
184 <term><option>--show-status=
</option></term>
186 <listitem><para>Takes a boolean argument or the special value
<constant>auto
</constant>. If on, terse unit
187 status information is shown on the console during boot-up and shutdown. If off, no such status information is
188 shown. If set to
<constant>auto
</constant> behavior is similar to off, except that it is automatically switched
189 to on, as soon as the first unit failure or significant boot delay is encountered. This switch has no effect
190 when invoked as user instance. If specified, overrides both the kernel command line setting
191 <varname>systemd.show_status=
</varname> (see below) and the configuration file option
192 <option>ShowStatus=
</option>, see
193 <citerefentry><refentrytitle>systemd-system.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
196 <term><option>--log-target=
</option></term>
198 <listitem><para>Set log target. Argument must be one of
199 <option>console
</option>,
200 <option>journal
</option>,
201 <option>kmsg
</option>,
202 <option>journal-or-kmsg
</option>,
203 <option>null
</option>.
</para></listitem>
206 <term><option>--log-level=
</option></term>
208 <listitem><para>Set log level. As
209 argument this accepts a numerical log
210 level or the well-known
<citerefentry project='man-pages'
><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
211 symbolic names (lowercase):
212 <option>emerg
</option>,
213 <option>alert
</option>,
214 <option>crit
</option>,
215 <option>err
</option>,
216 <option>warning
</option>,
217 <option>notice
</option>,
218 <option>info
</option>,
219 <option>debug
</option>.
</para></listitem>
222 <term><option>--log-color=
</option></term>
224 <listitem><para>Highlight important log messages. Argument is
225 a boolean value. If the argument is omitted, it defaults to
226 <option>true
</option>.
</para></listitem>
229 <term><option>--log-location=
</option></term>
231 <listitem><para>Include code location in log messages. This is
232 mostly relevant for debugging purposes. Argument is a boolean
233 value. If the argument is omitted it defaults to
234 <option>true
</option>.
</para></listitem>
237 <term><option>--default-standard-output=
</option></term>
238 <term><option>--default-standard-error=
</option></term>
240 <listitem><para>Sets the default output or error output for
241 all services and sockets, respectively. That is, controls the
242 default for
<option>StandardOutput=
</option> and
243 <option>StandardError=
</option> (see
244 <citerefentry><refentrytitle>systemd.exec
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
245 for details). Takes one of
246 <option>inherit
</option>,
247 <option>null
</option>,
248 <option>tty
</option>,
249 <option>journal
</option>,
250 <option>journal+console
</option>,
251 <option>syslog
</option>,
252 <option>syslog+console
</option>,
253 <option>kmsg
</option>,
254 <option>kmsg+console
</option>. If the
256 <option>--default-standard-output=
</option> defaults to
257 <option>journal
</option> and
258 <option>--default-standard-error=
</option> to
259 <option>inherit
</option>.
</para></listitem>
263 <term><option>--machine-id=
</option></term>
265 <listitem><para>Override the machine-id set on the hard drive,
266 useful for network booting or for containers. May not be set
267 to all zeros.
</para></listitem>
270 <xi:include href=
"standard-options.xml" xpointer=
"help" />
271 <xi:include href=
"standard-options.xml" xpointer=
"version" />
276 <title>Concepts
</title>
278 <para>systemd provides a dependency system between various
279 entities called
"units" of
11 different types. Units encapsulate
280 various objects that are relevant for system boot-up and
281 maintenance. The majority of units are configured in unit
282 configuration files, whose syntax and basic set of options is
284 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
285 however some are created automatically from other configuration,
286 dynamically from system state or programmatically at runtime.
287 Units may be
"active" (meaning started, bound, plugged in, …,
288 depending on the unit type, see below), or
"inactive" (meaning
289 stopped, unbound, unplugged, …), as well as in the process of
290 being activated or deactivated, i.e. between the two states (these
291 states are called
"activating",
"deactivating"). A special
292 "failed" state is available as well, which is very similar to
293 "inactive" and is entered when the service failed in some way
294 (process returned error code on exit, or crashed, or an operation
295 timed out). If this state is entered, the cause will be logged,
296 for later reference. Note that the various unit types may have a
297 number of additional substates, which are mapped to the five
298 generalized unit states described here.
</para>
300 <para>The following unit types are available:
</para>
303 <listitem><para>Service units, which start and control daemons
304 and the processes they consist of. For details, see
305 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
307 <listitem><para>Socket units, which encapsulate local IPC or
308 network sockets in the system, useful for socket-based
309 activation. For details about socket units, see
310 <citerefentry><refentrytitle>systemd.socket
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
311 for details on socket-based activation and other forms of
313 <citerefentry><refentrytitle>daemon
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para></listitem>
315 <listitem><para>Target units are useful to group units, or
316 provide well-known synchronization points during boot-up, see
317 <citerefentry><refentrytitle>systemd.target
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
319 <listitem><para>Device units expose kernel devices in systemd
320 and may be used to implement device-based activation. For
322 <citerefentry><refentrytitle>systemd.device
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
324 <listitem><para>Mount units control mount points in the file
325 system, for details see
326 <citerefentry><refentrytitle>systemd.mount
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
328 <listitem><para>Automount units provide automount capabilities,
329 for on-demand mounting of file systems as well as parallelized
331 <citerefentry><refentrytitle>systemd.automount
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
333 <listitem><para>Timer units are useful for triggering activation
334 of other units based on timers. You may find details in
335 <citerefentry><refentrytitle>systemd.timer
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
337 <listitem><para>Swap units are very similar to mount units and
338 encapsulate memory swap partitions or files of the operating
339 system. They are described in
340 <citerefentry><refentrytitle>systemd.swap
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
342 <listitem><para>Path units may be used to activate other
343 services when file system objects change or are modified. See
344 <citerefentry><refentrytitle>systemd.path
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
346 <listitem><para>Slice units may be used to group units which
347 manage system processes (such as service and scope units) in a
348 hierarchical tree for resource management purposes. See
349 <citerefentry><refentrytitle>systemd.slice
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
351 <listitem><para>Scope units are similar to service units, but
352 manage foreign processes instead of starting them as well. See
353 <citerefentry><refentrytitle>systemd.scope
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
357 <para>Units are named as their configuration files. Some units
358 have special semantics. A detailed list is available in
359 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
361 <para>systemd knows various kinds of dependencies, including
362 positive and negative requirement dependencies (i.e.
363 <varname>Requires=
</varname> and
<varname>Conflicts=
</varname>) as
364 well as ordering dependencies (
<varname>After=
</varname> and
365 <varname>Before=
</varname>). NB: ordering and requirement
366 dependencies are orthogonal. If only a requirement dependency
367 exists between two units (e.g.
<filename>foo.service
</filename>
368 requires
<filename>bar.service
</filename>), but no ordering
369 dependency (e.g.
<filename>foo.service
</filename> after
370 <filename>bar.service
</filename>) and both are requested to start,
371 they will be started in parallel. It is a common pattern that both
372 requirement and ordering dependencies are placed between two
373 units. Also note that the majority of dependencies are implicitly
374 created and maintained by systemd. In most cases, it should be
375 unnecessary to declare additional dependencies manually, however
376 it is possible to do this.
</para>
378 <para>Application programs and units (via dependencies) may
379 request state changes of units. In systemd, these requests are
380 encapsulated as 'jobs' and maintained in a job queue. Jobs may
381 succeed or can fail, their execution is ordered based on the
382 ordering dependencies of the units they have been scheduled
385 <para>On boot systemd activates the target unit
386 <filename>default.target
</filename> whose job is to activate
387 on-boot services and other on-boot units by pulling them in via
388 dependencies. Usually, the unit name is just an alias (symlink) for
389 either
<filename>graphical.target
</filename> (for fully-featured
390 boots into the UI) or
<filename>multi-user.target
</filename> (for
391 limited console-only boots for use in embedded or server
392 environments, or similar; a subset of graphical.target). However,
393 it is at the discretion of the administrator to configure it as an
394 alias to any other target unit. See
395 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
396 for details about these target units.
</para>
398 <para>Processes systemd spawns are placed in individual Linux
399 control groups named after the unit which they belong to in the
400 private systemd hierarchy. (see
<ulink
401 url=
"https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt
</ulink>
402 for more information about control groups, or short
"cgroups").
403 systemd uses this to effectively keep track of processes. Control
404 group information is maintained in the kernel, and is accessible
405 via the file system hierarchy (beneath
406 <filename>/sys/fs/cgroup/systemd/
</filename>), or in tools such as
407 <citerefentry project='man-pages'
><refentrytitle>systemd-cgls
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
409 <citerefentry project='man-pages'
><refentrytitle>ps
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
410 (
<command>ps xawf -eo pid,user,cgroup,args
</command> is
411 particularly useful to list all processes and the systemd units
412 they belong to.).
</para>
414 <para>systemd is compatible with the SysV init system to a large
415 degree: SysV init scripts are supported and simply read as an
416 alternative (though limited) configuration file format. The SysV
417 <filename>/dev/initctl
</filename> interface is provided, and
418 compatibility implementations of the various SysV client tools are
419 available. In addition to that, various established Unix
420 functionality such as
<filename>/etc/fstab
</filename> or the
421 <filename>utmp
</filename> database are supported.
</para>
423 <para>systemd has a minimal transaction system: if a unit is
424 requested to start up or shut down it will add it and all its
425 dependencies to a temporary transaction. Then, it will verify if
426 the transaction is consistent (i.e. whether the ordering of all
427 units is cycle-free). If it is not, systemd will try to fix it up,
428 and removes non-essential jobs from the transaction that might
429 remove the loop. Also, systemd tries to suppress non-essential
430 jobs in the transaction that would stop a running service. Finally
431 it is checked whether the jobs of the transaction contradict jobs
432 that have already been queued, and optionally the transaction is
433 aborted then. If all worked out and the transaction is consistent
434 and minimized in its impact it is merged with all already
435 outstanding jobs and added to the run queue. Effectively this
436 means that before executing a requested operation, systemd will
437 verify that it makes sense, fixing it if possible, and only
438 failing if it really cannot work.
</para>
440 <para>Systemd contains native implementations of various tasks
441 that need to be executed as part of the boot process. For example,
442 it sets the hostname or configures the loopback network device. It
443 also sets up and mounts various API file systems, such as
444 <filename>/sys
</filename> or
<filename>/proc
</filename>.
</para>
446 <para>For more information about the concepts and
447 ideas behind systemd, please refer to the
448 <ulink url=
"http://0pointer.de/blog/projects/systemd.html">Original Design Document
</ulink>.
</para>
450 <para>Note that some but not all interfaces provided
451 by systemd are covered by the
452 <ulink url=
"http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
453 Stability Promise
</ulink>.
</para>
455 <para>Units may be generated dynamically at boot and system
456 manager reload time, for example based on other configuration
457 files or parameters passed on the kernel command line. For details, see
458 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
460 <para>Systems which invoke systemd in a container or initrd
461 environment should implement the
462 <ulink url=
"http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container Interface
</ulink> or
463 <ulink url=
"http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd Interface
</ulink>
464 specifications, respectively.
</para>
468 <title>Directories
</title>
472 <term>System unit directories
</term>
474 <listitem><para>The systemd system manager reads unit
475 configuration from various directories. Packages that want to
476 install unit files shall place them in the directory returned
477 by
<command>pkg-config systemd
478 --variable=systemdsystemunitdir
</command>. Other directories
479 checked are
<filename>/usr/local/lib/systemd/system
</filename>
480 and
<filename>/usr/lib/systemd/system
</filename>. User
481 configuration always takes precedence.
<command>pkg-config
482 systemd --variable=systemdsystemconfdir
</command> returns the
483 path of the system configuration directory. Packages should
484 alter the content of these directories only with the
485 <command>enable
</command> and
<command>disable
</command>
487 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
488 tool. Full list of directories is provided in
489 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
496 <term>User unit directories
</term>
498 <listitem><para>Similar rules apply for the user unit
499 directories. However, here the
500 <ulink url=
"http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
501 Base Directory specification
</ulink> is followed to find
502 units. Applications should place their unit files in the
503 directory returned by
<command>pkg-config systemd
504 --variable=systemduserunitdir
</command>. Global configuration
505 is done in the directory reported by
<command>pkg-config
506 systemd --variable=systemduserconfdir
</command>. The
507 <command>enable
</command> and
<command>disable
</command>
509 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
510 tool can handle both global (i.e. for all users) and private
511 (for one user) enabling/disabling of units. Full list of
512 directories is provided in
513 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
520 <term>SysV init scripts directory
</term>
522 <listitem><para>The location of the SysV init script directory
523 varies between distributions. If systemd cannot find a native
524 unit file for a requested service, it will look for a SysV
525 init script of the same name (with the
526 <filename>.service
</filename> suffix
527 removed).
</para></listitem>
533 <term>SysV runlevel link farm directory
</term>
535 <listitem><para>The location of the SysV runlevel link farm
536 directory varies between distributions. systemd will take the
537 link farm into account when figuring out whether a service
538 shall be enabled. Note that a service unit with a native unit
539 configuration file cannot be started by activating it in the
540 SysV runlevel link farm.
</para></listitem>
546 <title>Signals
</title>
550 <term><constant>SIGTERM
</constant></term>
552 <listitem><para>Upon receiving this signal the systemd system
553 manager serializes its state, reexecutes itself and
554 deserializes the saved state again. This is mostly equivalent
555 to
<command>systemctl daemon-reexec
</command>.
</para>
557 <para>systemd user managers will start the
558 <filename>exit.target
</filename> unit when this signal is
559 received. This is mostly equivalent to
<command>systemctl
560 --user start exit.target
</command>.
</para></listitem>
564 <term><constant>SIGINT
</constant></term>
566 <listitem><para>Upon receiving this signal the systemd system
567 manager will start the
568 <filename>ctrl-alt-del.target
</filename> unit. This is mostly
569 equivalent to
<command>systemctl start
570 ctl-alt-del.target
</command>. If this signal is received more
571 than
7 times per
2s, an immediate reboot is triggered.
572 Note that pressing Ctrl-Alt-Del on the console will trigger
573 this signal. Hence, if a reboot is hanging, pressing
574 Ctrl-Alt-Del more than
7 times in
2s is a relatively safe way
575 to trigger an immediate reboot.
</para>
577 <para>systemd user managers treat this signal the same way as
578 <constant>SIGTERM
</constant>.
</para></listitem>
582 <term><constant>SIGWINCH
</constant></term>
584 <listitem><para>When this signal is received the systemd
585 system manager will start the
586 <filename>kbrequest.target
</filename> unit. This is mostly
587 equivalent to
<command>systemctl start
588 kbrequest.target
</command>.
</para>
590 <para>This signal is ignored by systemd user
591 managers.
</para></listitem>
595 <term><constant>SIGPWR
</constant></term>
597 <listitem><para>When this signal is received the systemd
598 manager will start the
<filename>sigpwr.target
</filename>
599 unit. This is mostly equivalent to
<command>systemctl start
600 sigpwr.target
</command>.
</para></listitem>
604 <term><constant>SIGUSR1
</constant></term>
606 <listitem><para>When this signal is received the systemd
607 manager will try to reconnect to the D-Bus
608 bus.
</para></listitem>
612 <term><constant>SIGUSR2
</constant></term>
614 <listitem><para>When this signal is received the systemd
615 manager will log its complete state in human-readable form.
616 The data logged is the same as printed by
617 <command>systemd-analyze dump
</command>.
</para></listitem>
621 <term><constant>SIGHUP
</constant></term>
623 <listitem><para>Reloads the complete daemon configuration.
624 This is mostly equivalent to
<command>systemctl
625 daemon-reload
</command>.
</para></listitem>
629 <term><constant>SIGRTMIN+
0</constant></term>
631 <listitem><para>Enters default mode, starts the
632 <filename>default.target
</filename> unit. This is mostly
633 equivalent to
<command>systemctl start
634 default.target
</command>.
</para></listitem>
638 <term><constant>SIGRTMIN+
1</constant></term>
640 <listitem><para>Enters rescue mode, starts the
641 <filename>rescue.target
</filename> unit. This is mostly
642 equivalent to
<command>systemctl isolate
643 rescue.target
</command>.
</para></listitem>
647 <term><constant>SIGRTMIN+
2</constant></term>
649 <listitem><para>Enters emergency mode, starts the
650 <filename>emergency.service
</filename> unit. This is mostly
651 equivalent to
<command>systemctl isolate
652 emergency.service
</command>.
</para></listitem>
656 <term><constant>SIGRTMIN+
3</constant></term>
658 <listitem><para>Halts the machine, starts the
659 <filename>halt.target
</filename> unit. This is mostly
660 equivalent to
<command>systemctl start
661 halt.target
</command>.
</para></listitem>
665 <term><constant>SIGRTMIN+
4</constant></term>
667 <listitem><para>Powers off the machine, starts the
668 <filename>poweroff.target
</filename> unit. This is mostly
669 equivalent to
<command>systemctl start
670 poweroff.target
</command>.
</para></listitem>
674 <term><constant>SIGRTMIN+
5</constant></term>
676 <listitem><para>Reboots the machine, starts the
677 <filename>reboot.target
</filename> unit. This is mostly
678 equivalent to
<command>systemctl start
679 reboot.target
</command>.
</para></listitem>
683 <term><constant>SIGRTMIN+
6</constant></term>
685 <listitem><para>Reboots the machine via kexec, starts the
686 <filename>kexec.target
</filename> unit. This is mostly
687 equivalent to
<command>systemctl start
688 kexec.target
</command>.
</para></listitem>
692 <term><constant>SIGRTMIN+
13</constant></term>
694 <listitem><para>Immediately halts the machine.
</para></listitem>
698 <term><constant>SIGRTMIN+
14</constant></term>
700 <listitem><para>Immediately powers off the machine.
</para></listitem>
704 <term><constant>SIGRTMIN+
15</constant></term>
706 <listitem><para>Immediately reboots the machine.
</para></listitem>
710 <term><constant>SIGRTMIN+
16</constant></term>
712 <listitem><para>Immediately reboots the machine with kexec.
</para></listitem>
716 <term><constant>SIGRTMIN+
20</constant></term>
718 <listitem><para>Enables display of status messages on the
719 console, as controlled via
720 <varname>systemd.show_status=
1</varname> on the kernel command
721 line.
</para></listitem>
725 <term><constant>SIGRTMIN+
21</constant></term>
727 <listitem><para>Disables display of
728 status messages on the console, as
730 <varname>systemd.show_status=
0</varname>
731 on the kernel command
732 line.
</para></listitem>
736 <term><constant>SIGRTMIN+
22</constant></term>
737 <term><constant>SIGRTMIN+
23</constant></term>
739 <listitem><para>Sets the log level to
<literal>debug
</literal>
740 (or
<literal>info
</literal> on
741 <constant>SIGRTMIN+
23</constant>), as controlled via
742 <varname>systemd.log_level=debug
</varname> (or
743 <varname>systemd.log_level=info
</varname> on
744 <constant>SIGRTMIN+
23</constant>) on the kernel command
745 line.
</para></listitem>
749 <term><constant>SIGRTMIN+
24</constant></term>
751 <listitem><para>Immediately exits the manager (only available
752 for --user instances).
</para></listitem>
756 <term><constant>SIGRTMIN+
26</constant></term>
757 <term><constant>SIGRTMIN+
27</constant></term>
758 <term><constant>SIGRTMIN+
28</constant></term>
760 <listitem><para>Sets the log level to
761 <literal>journal-or-kmsg
</literal> (or
762 <literal>console
</literal> on
763 <constant>SIGRTMIN+
27</constant>,
<literal>kmsg
</literal> on
764 <constant>SIGRTMIN+
28</constant>), as controlled via
765 <varname>systemd.log_target=journal-or-kmsg
</varname> (or
766 <varname>systemd.log_target=console
</varname> on
767 <constant>SIGRTMIN+
27</constant> or
768 <varname>systemd.log_target=kmsg
</varname> on
769 <constant>SIGRTMIN+
28</constant>) on the kernel command
770 line.
</para></listitem>
776 <title>Environment
</title>
778 <variablelist class='environment-variables'
>
780 <term><varname>$SYSTEMD_LOG_LEVEL
</varname></term>
781 <listitem><para>systemd reads the log level from this
782 environment variable. This can be overridden with
783 <option>--log-level=
</option>.
</para></listitem>
787 <term><varname>$SYSTEMD_LOG_TARGET
</varname></term>
788 <listitem><para>systemd reads the log target from this
789 environment variable. This can be overridden with
790 <option>--log-target=
</option>.
</para></listitem>
794 <term><varname>$SYSTEMD_LOG_COLOR
</varname></term>
795 <listitem><para>Controls whether systemd highlights important
796 log messages. This can be overridden with
797 <option>--log-color=
</option>.
</para></listitem>
801 <term><varname>$SYSTEMD_LOG_LOCATION
</varname></term>
802 <listitem><para>Controls whether systemd prints the code
803 location along with log messages. This can be overridden with
804 <option>--log-location=
</option>.
</para></listitem>
808 <term><varname>$XDG_CONFIG_HOME
</varname></term>
809 <term><varname>$XDG_CONFIG_DIRS
</varname></term>
810 <term><varname>$XDG_DATA_HOME
</varname></term>
811 <term><varname>$XDG_DATA_DIRS
</varname></term>
813 <listitem><para>The systemd user manager uses these variables
814 in accordance to the
<ulink
815 url=
"http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
816 Base Directory specification
</ulink> to find its
817 configuration.
</para></listitem>
821 <term><varname>$SYSTEMD_UNIT_PATH
</varname></term>
823 <listitem><para>Controls where systemd looks for unit
824 files.
</para></listitem>
828 <term><varname>$SYSTEMD_SYSVINIT_PATH
</varname></term>
830 <listitem><para>Controls where systemd looks for SysV init
831 scripts.
</para></listitem>
835 <term><varname>$SYSTEMD_SYSVRCND_PATH
</varname></term>
837 <listitem><para>Controls where systemd looks for SysV init
838 script runlevel link farms.
</para></listitem>
842 <term><varname>$SYSTEMD_COLORS
</varname></term>
844 <listitem><para>The value must be a boolean. Controls whether colorized output should be
845 generated. This can be specified to override the decision that
<command>systemd
</command>
846 makes based on
<varname>$TERM
</varname> and what the console is connected to.
</para>
851 <term><varname>$LISTEN_PID
</varname></term>
852 <term><varname>$LISTEN_FDS
</varname></term>
853 <term><varname>$LISTEN_FDNAMES
</varname></term>
855 <listitem><para>Set by systemd for supervised processes during
856 socket-based activation. See
857 <citerefentry><refentrytitle>sd_listen_fds
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
858 for more information.
</para></listitem>
862 <term><varname>$NOTIFY_SOCKET
</varname></term>
864 <listitem><para>Set by systemd for supervised processes for
865 status and start-up completion notification. See
866 <citerefentry><refentrytitle>sd_notify
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
867 for more information.
</para></listitem>
873 <title>Kernel Command Line
</title>
875 <para>When run as system instance systemd parses a number of
876 kernel command line arguments
<footnote><para>If run inside a Linux
877 container these arguments may be passed as command line arguments
878 to systemd itself, next to any of the command line options listed
879 in the Options section above. If run outside of Linux containers,
880 these arguments are parsed from
<filename>/proc/cmdline
</filename>
881 instead.
</para></footnote>:
</para>
883 <variablelist class='kernel-commandline-options'
>
885 <term><varname>systemd.unit=
</varname></term>
886 <term><varname>rd.systemd.unit=
</varname></term>
888 <listitem><para>Overrides the unit to activate on boot.
889 Defaults to
<filename>default.target
</filename>. This may be
890 used to temporarily boot into a different boot unit, for
891 example
<filename>rescue.target
</filename> or
892 <filename>emergency.service
</filename>. See
893 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
894 for details about these units. The option prefixed with
895 <literal>rd.
</literal> is honored only in the initial RAM disk
896 (initrd), while the one that is not prefixed only in the main
897 system.
</para></listitem>
901 <term><varname>systemd.dump_core=
</varname></term>
903 <listitem><para>Takes a boolean argument. If
904 <option>yes
</option>, the systemd manager (PID
1) dumps core
905 when it crashes. Otherwise, no core dump is created. Defaults
906 to
<option>yes
</option>.
</para></listitem>
910 <term><varname>systemd.crash_chvt=
</varname></term>
912 <listitem><para>Takes a positive integer, or a boolean
913 argument. If a positive integer (in the range
1–
63) is
914 specified, the system manager (PID
1) will activate the specified
915 virtual terminal (VT) when it crashes. Defaults to
916 <constant>no
</constant>, meaning that no such switch is
917 attempted. If set to
<constant>yes
</constant>, the VT the
918 kernel messages are written to is selected.
</para></listitem>
922 <term><varname>systemd.crash_shell=
</varname></term>
924 <listitem><para>Takes a boolean argument. If
925 <option>yes
</option>, the system manager (PID
1) spawns a
926 shell when it crashes, after a
10s delay. Otherwise, no shell
927 is spawned. Defaults to
<option>no
</option>, for security
928 reasons, as the shell is not protected by password
929 authentication.
</para></listitem>
933 <term><varname>systemd.crash_reboot=
</varname></term>
935 <listitem><para>Takes a boolean argument. If
936 <option>yes
</option>, the system manager (PID
1) will reboot
937 the machine automatically when it crashes, after a
10s delay.
938 Otherwise, the system will hang indefinitely. Defaults to
939 <option>no
</option>, in order to avoid a reboot loop. If
940 combined with
<varname>systemd.crash_shell=
</varname>, the
941 system is rebooted after the shell exits.
</para></listitem>
945 <term><varname>systemd.confirm_spawn=
</varname></term>
947 <listitem><para>Takes a boolean argument or a path to the
948 virtual console where the confirmation messages should be
949 emitted. If
<option>yes
</option>, the system manager (PID
1)
950 asks for confirmation when spawning processes using
951 <option>/dev/console
</option>. If a path or a console name
952 (such as
<literal>ttyS0
</literal>) is provided, the virtual
953 console pointed to by this path or described by the give name
954 will be used instead. Defaults to
<option>no
</option>.
</para></listitem>
958 <term><varname>systemd.show_status=
</varname></term>
960 <listitem><para>Takes a boolean argument or the constant
<constant>auto
</constant>. If
<option>yes
</option>,
961 the systemd manager (PID
1) shows terse service status updates on the console during bootup.
962 <constant>auto
</constant> behaves like
<option>false
</option> until a unit fails or there is a significant
963 delay in boot. Defaults to
<option>yes
</option>, unless
<option>quiet
</option> is passed as kernel command
964 line option, in which case it defaults to
<constant>auto
</constant>. If specified overrides the system manager
965 configuration file option
<option>ShowStatus=
</option>, see
966 <citerefentry><refentrytitle>systemd-system.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>. However,
967 the process command line option
<option>--show-status=
</option> takes precedence over both this kernel command
968 line option and the configuration file option.
</para></listitem>
972 <term><varname>systemd.log_target=
</varname></term>
973 <term><varname>systemd.log_level=
</varname></term>
974 <term><varname>systemd.log_color=
</varname></term>
975 <term><varname>systemd.log_location=
</varname></term>
977 <listitem><para>Controls log output, with the same effect as
978 the
<varname>$SYSTEMD_LOG_TARGET
</varname>,
979 <varname>$SYSTEMD_LOG_LEVEL
</varname>,
980 <varname>$SYSTEMD_LOG_COLOR
</varname>,
981 <varname>$SYSTEMD_LOG_LOCATION
</varname> environment variables
982 described above.
</para></listitem>
986 <term><varname>systemd.default_standard_output=
</varname></term>
987 <term><varname>systemd.default_standard_error=
</varname></term>
988 <listitem><para>Controls default standard output and error
989 output for services, with the same effect as the
990 <option>--default-standard-output=
</option> and
991 <option>--default-standard-error=
</option> command line
992 arguments described above, respectively.
</para></listitem>
996 <term><varname>systemd.setenv=
</varname></term>
998 <listitem><para>Takes a string argument in the form
999 VARIABLE=VALUE. May be used to set default environment
1000 variables to add to forked child processes. May be used more
1001 than once to set multiple variables.
</para></listitem>
1005 <term><varname>systemd.machine_id=
</varname></term>
1007 <listitem><para>Takes a
32 character hex value to be
1008 used for setting the machine-id. Intended mostly for
1009 network booting where the same machine-id is desired
1010 for every boot.
</para></listitem>
1014 <term><varname>systemd.unified_cgroup_hierarchy
</varname></term>
1016 <listitem><para>When specified without an argument or with a true argument,
1017 enables the usage of
1018 <ulink url=
"https://www.kernel.org/doc/Documentation/cgroup-v2.txt">unified cgroup hierarchy
</ulink>
1019 (a.k.a. cgroups-v2). When specified with a false argument, fall back to
1020 hybrid or full legacy cgroup hierarchy.
</para>
1022 <para>If this option is not specified, the default behaviour is determined
1023 during compilation (the
<option>--with-default-hierarchy=
</option>
1024 option). If the kernel does not support unified cgroup hierarchy, the legacy
1025 hierarchy will be used even if this option is specified.
</para>
1030 <term><varname>systemd.legacy_systemd_cgroup_controller
</varname></term>
1032 <listitem><para>Takes effect if the full unified cgroup hierarchy is not used
1033 (see previous option). When specified without an argument or with a true
1034 argument, disables the use of
"hybrid" cgroup hierarchy (i.e. a cgroups-v2
1035 tree used for systemd, and
1036 <ulink url=
"https://www.kernel.org/doc/Documentation/cgroup-v1/">legacy
1037 cgroup hierarchy
</ulink>, a.k.a. cgroups-v1, for other controllers), and
1038 forces a full
"legacy" mode. When specified with a false argument, enables
1039 the use of
"hybrid" hierarchy.
</para>
1041 <para>If this option is not specified, the default behaviour is determined
1042 during compilation (the
<option>--with-default-hierarchy=
</option>
1043 option). If the kernel does not support unified cgroup hierarchy, the legacy
1044 hierarchy will be used even if this option is specified.
</para>
1049 <term><varname>quiet
</varname></term>
1051 <listitem><para>Turn off status output at boot, much like
1052 <varname>systemd.show_status=false
</varname> would. Note that
1053 this option is also read by the kernel itself and disables
1054 kernel log output. Passing this option hence turns off the
1055 usual output from both the system manager and the kernel.
1060 <term><varname>debug
</varname></term>
1062 <listitem><para>Turn on debugging output. This is equivalent
1063 to
<varname>systemd.log_level=debug
</varname>. Note that this
1064 option is also read by the kernel itself and enables kernel
1065 debug output. Passing this option hence turns on the debug
1066 output from both the system manager and the
1067 kernel.
</para></listitem>
1071 <term><varname>emergency
</varname></term>
1072 <term><varname>rd.emergency
</varname></term>
1073 <term><varname>-b
</varname></term>
1075 <listitem><para>Boot into emergency mode. This is equivalent
1076 to
<varname>systemd.unit=emergency.target
</varname> or
1077 <varname>rd.systemd.unit=emergency.target
</varname>, respectively, and
1078 provided for compatibility reasons and to be easier to type.
</para></listitem>
1082 <term><varname>rescue
</varname></term>
1083 <term><varname>rd.rescue
</varname></term>
1084 <term><varname>single
</varname></term>
1085 <term><varname>s
</varname></term>
1086 <term><varname>S
</varname></term>
1087 <term><varname>1</varname></term>
1089 <listitem><para>Boot into rescue mode. This is equivalent to
1090 <varname>systemd.unit=rescue.target
</varname> or
1091 <varname>rd.systemd.unit=rescue.target
</varname>, respectively, and
1092 provided for compatibility reasons and to be easier to type.
</para></listitem>
1096 <term><varname>2</varname></term>
1097 <term><varname>3</varname></term>
1098 <term><varname>4</varname></term>
1099 <term><varname>5</varname></term>
1101 <listitem><para>Boot into the specified legacy SysV runlevel.
1102 These are equivalent to
1103 <varname>systemd.unit=runlevel2.target
</varname>,
1104 <varname>systemd.unit=runlevel3.target
</varname>,
1105 <varname>systemd.unit=runlevel4.target
</varname>, and
1106 <varname>systemd.unit=runlevel5.target
</varname>,
1107 respectively, and provided for compatibility reasons and to be
1108 easier to type.
</para></listitem>
1112 <term><varname>locale.LANG=
</varname></term>
1113 <term><varname>locale.LANGUAGE=
</varname></term>
1114 <term><varname>locale.LC_CTYPE=
</varname></term>
1115 <term><varname>locale.LC_NUMERIC=
</varname></term>
1116 <term><varname>locale.LC_TIME=
</varname></term>
1117 <term><varname>locale.LC_COLLATE=
</varname></term>
1118 <term><varname>locale.LC_MONETARY=
</varname></term>
1119 <term><varname>locale.LC_MESSAGES=
</varname></term>
1120 <term><varname>locale.LC_PAPER=
</varname></term>
1121 <term><varname>locale.LC_NAME=
</varname></term>
1122 <term><varname>locale.LC_ADDRESS=
</varname></term>
1123 <term><varname>locale.LC_TELEPHONE=
</varname></term>
1124 <term><varname>locale.LC_MEASUREMENT=
</varname></term>
1125 <term><varname>locale.LC_IDENTIFICATION=
</varname></term>
1127 <listitem><para>Set the system locale to use. This overrides
1128 the settings in
<filename>/etc/locale.conf
</filename>. For
1129 more information, see
1130 <citerefentry project='man-pages'
><refentrytitle>locale.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1132 <citerefentry project='man-pages'
><refentrytitle>locale
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1137 <para>For other kernel command line parameters understood by
1138 components of the core OS, please refer to
1139 <citerefentry><refentrytitle>kernel-command-line
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
1143 <title>Sockets and FIFOs
</title>
1147 <term><filename>/run/systemd/notify
</filename></term>
1149 <listitem><para>Daemon status notification socket. This is an
1150 <constant>AF_UNIX
</constant> datagram socket and is used to
1151 implement the daemon notification logic as implemented by
1152 <citerefentry><refentrytitle>sd_notify
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para></listitem>
1157 <term><filename>/run/systemd/private
</filename></term>
1159 <listitem><para>Used internally as communication channel
1161 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1162 and the systemd process. This is an
1163 <constant>AF_UNIX
</constant> stream socket. This interface is
1164 private to systemd and should not be used in external
1165 projects.
</para></listitem>
1169 <term><filename>/dev/initctl
</filename></term>
1171 <listitem><para>Limited compatibility support for the SysV
1172 client interface, as implemented by the
1173 <filename>systemd-initctl.service
</filename> unit. This is a
1174 named pipe in the file system. This interface is obsolete and
1175 should not be used in new applications.
</para></listitem>
1181 <title>See Also
</title>
1183 The
<ulink url=
"http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage
</ulink>,
1184 <citerefentry><refentrytitle>systemd-system.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1185 <citerefentry project='man-pages'
><refentrytitle>locale.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1186 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1187 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1188 <citerefentry><refentrytitle>systemd-notify
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1189 <citerefentry><refentrytitle>daemon
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1190 <citerefentry><refentrytitle>sd-daemon
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1191 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1192 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1193 <citerefentry project='die-net'
><refentrytitle>pkg-config
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1194 <citerefentry><refentrytitle>kernel-command-line
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1195 <citerefentry project='man-pages'
><refentrytitle>bootup
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1196 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>