1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd">
27 <title>systemd</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd</refentrytitle>
42 <manvolnum>1</manvolnum>
46 <refname>systemd</refname>
47 <refname>init</refname>
48 <refpurpose>systemd system and service manager</refpurpose>
53 <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
56 <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
61 <title>Description</title>
63 <para>systemd is a system and service manager for
64 Linux operating systems. When run as first process on
65 boot (as PID 1), it acts as init system that brings
66 up and maintains userspace services.</para>
68 <para>For compatibility with SysV, if systemd is called
69 as <command>init</command> and a PID that is not
70 1, it will execute <command>telinit</command> and pass
71 all command line arguments unmodified. That means
72 <command>init</command> and <command>telinit</command>
73 are mostly equivalent when invoked from normal login sessions. See
74 <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
75 for more information.</para>
77 <para>When run as system instance, systemd interprets
78 the configuration file
79 <filename>system.conf</filename>, otherwise
80 <filename>user.conf</filename>. See
81 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
82 for more information.</para>
86 <title>Options</title>
88 <para>The following options are understood:</para>
92 <term><option>-h</option></term>
93 <term><option>--help</option></term>
95 <listitem><para>Prints a short help
96 text and exits.</para></listitem>
99 <term><option>--version</option></term>
101 <listitem><para>Prints a systemd version
102 identifier and exits.</para></listitem>
105 <term><option>--test</option></term>
107 <listitem><para>Determine startup
108 sequence, dump it and exit. This is an
109 option useful for debugging
110 only.</para></listitem>
113 <term><option>--dump-configuration-items</option></term>
115 <listitem><para>Dump understood unit
116 configuration items. This outputs a
117 terse but complete list of
118 configuration items understood in unit
119 definition files.</para></listitem>
122 <term><option>--introspect=</option></term>
124 <listitem><para>Extract D-Bus
125 interface introspection data. This is
126 mostly useful at install time
127 to generate data suitable for the
129 repository. Optionally the interface
130 name for the introspection data may be
131 specified. If omitted, the
132 introspection data for all interfaces
133 is dumped.</para></listitem>
136 <term><option>--unit=</option></term>
138 <listitem><para>Set default unit to
139 activate on startup. If not specified,
141 <filename>default.target</filename>.</para></listitem>
144 <term><option>--system</option></term>
145 <term><option>--user</option></term>
147 <listitem><para>For <option>--system</option>,
148 tell systemd to run a
149 system instance, even if the process ID is
150 not 1, i.e. systemd is not run as init process.
151 <option>--user</option> does the opposite,
152 running a user instance even if the process
154 Normally it should not be necessary to
155 pass these options, as systemd
156 automatically detects the mode it is
157 started in. These options are hence of
158 little use except for debugging. Note
159 that it is not supported booting and
160 maintaining a full system with systemd
161 running in <option>--system</option>
162 mode, but PID not 1. In practice,
163 passing <option>--system</option> explicitly is
164 only useful in conjunction with
165 <option>--test</option>.</para></listitem>
168 <term><option>--dump-core</option></term>
170 <listitem><para>Dump core on
171 crash. This switch has no effect when
173 instance.</para></listitem>
176 <term><option>--crash-shell</option></term>
178 <listitem><para>Run shell on
179 crash. This switch has no effect when
181 instance.</para></listitem>
184 <term><option>--confirm-spawn</option></term>
186 <listitem><para>Ask for confirmation
187 when spawning processes. This switch
188 has no effect when run as user
189 instance.</para></listitem>
192 <term><option>--show-status=</option></term>
194 <listitem><para>Show terse service
195 status information while booting. This
196 switch has no effect when run as user
197 instance. Takes a boolean argument
198 which may be omitted which is
200 <option>true</option>.</para></listitem>
203 <term><option>--log-target=</option></term>
205 <listitem><para>Set log
206 target. Argument must be one of
207 <option>console</option>,
208 <option>journal</option>,
209 <option>syslog</option>,
210 <option>kmsg</option>,
211 <option>journal-or-kmsg</option>,
212 <option>syslog-or-kmsg</option>,
213 <option>null</option>.</para></listitem>
216 <term><option>--log-level=</option></term>
218 <listitem><para>Set log level. As
219 argument this accepts a numerical log
220 level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
221 symbolic names (lowercase):
222 <option>emerg</option>,
223 <option>alert</option>,
224 <option>crit</option>,
225 <option>err</option>,
226 <option>warning</option>,
227 <option>notice</option>,
228 <option>info</option>,
229 <option>debug</option>.</para></listitem>
232 <term><option>--log-color=</option></term>
234 <listitem><para>Highlight important
235 log messages. Argument is a boolean
236 value. If the argument is omitted, it
238 <option>true</option>.</para></listitem>
241 <term><option>--log-location=</option></term>
243 <listitem><para>Include code location
244 in log messages. This is mostly
245 relevant for debugging
246 purposes. Argument is a boolean
247 value. If the argument is omitted
249 <option>true</option>.</para></listitem>
252 <term><option>--default-standard-output=</option></term>
253 <term><option>--default-standard-error=</option></term>
255 <listitem><para>Sets the default
256 output or error output for all
257 services and sockets, respectively. That is, controls
259 <option>StandardOutput=</option>
260 and <option>StandardError=</option>
262 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
263 for details). Takes one of
264 <option>inherit</option>,
265 <option>null</option>,
266 <option>tty</option>,
267 <option>journal</option>,
268 <option>journal+console</option>,
269 <option>syslog</option>,
270 <option>syslog+console</option>,
271 <option>kmsg</option>,
272 <option>kmsg+console</option>. If the
274 <option>--default-standard-output=</option>
275 defaults to <option>journal</option>
277 <option>--default-standard-error=</option>
279 <option>inherit</option>.</para></listitem>
285 <title>Concepts</title>
287 <para>systemd provides a dependency system between
288 various entities called "units" of 12 different
289 types. Units encapsulate various objects that are
290 relevant for system boot-up and maintenance. The
291 majority of units are configured in unit configuration
292 files, whose syntax and basic set of options is
294 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
295 however some are created automatically from other
296 configuration, dynamically from system state or
297 programmatically at runtime. Units may be "active"
298 (meaning started, bound, plugged in, ..., depending on
299 the unit type, see below), or "inactive" (meaning
300 stopped, unbound, unplugged, ...), as well as in the
301 process of being activated or deactivated,
302 i.e. between the two states (these states are called
303 "activating", "deactivating"). A special "failed"
304 state is available as well, which is very similar to
305 "inactive" and is entered when the service failed in
306 some way (process returned error code on exit, or
307 crashed, or an operation timed out). If this state is
308 entered, the cause will be logged, for later
309 reference. Note that the various unit types may have a
310 number of additional substates, which are mapped to
311 the five generalized unit states described
314 <para>The following unit types are available:</para>
317 <listitem><para>Service units, which start and control
318 daemons and the processes they consist of. For
320 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
322 <listitem><para>Socket units, which
323 encapsulate local IPC or network sockets in
324 the system, useful for socket-based
325 activation. For details about socket units see
326 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
327 for details on socket-based activation and
328 other forms of activation, see
329 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
331 <listitem><para>Target units are useful to
332 group units, or provide well-known
333 synchronization points during boot-up, see
334 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
336 <listitem><para>Device units expose kernel
337 devices in systemd and may be used to
338 implement device-based activation. For details
340 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
342 <listitem><para>Mount units control mount
343 points in the file system, for details see
344 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
346 <listitem><para>Automount units provide
347 automount capabilities, for on-demand mounting
348 of file systems as well as parallelized
350 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
352 <listitem><para>Snapshot units can be used to
353 temporarily save the state of the set of
354 systemd units, which later may be restored by
355 activating the saved snapshot unit. For more
357 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
359 <listitem><para>Timer units are useful for
360 triggering activation of other units based on
361 timers. You may find details in
362 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
364 <listitem><para>Swap units are very similar to
365 mount units and encapsulate memory swap
366 partitions or files of the operating
367 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
369 <listitem><para>Path units may be used
370 to activate other services when file system
371 objects change or are modified. See
372 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
374 <listitem><para>Slice units may be used to
375 group units which manage system processes
376 (such as service and scope units) in a
377 hierarchical tree for resource management
379 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
381 <listitem><para>Scope units are similar to
382 service units, but manage foreign processes
383 instead of starting them as well. See
384 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
388 <para>Units are named as their configuration
389 files. Some units have special semantics. A detailed
391 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
393 <para>systemd knows various kinds of dependencies,
394 including positive and negative requirement
395 dependencies (i.e. <varname>Requires=</varname> and
396 <varname>Conflicts=</varname>) as well as ordering
397 dependencies (<varname>After=</varname> and
398 <varname>Before=</varname>). NB: ordering and
399 requirement dependencies are orthogonal. If only a
400 requirement dependency exists between two units
401 (e.g. <filename>foo.service</filename> requires
402 <filename>bar.service</filename>), but no ordering
403 dependency (e.g. <filename>foo.service</filename>
404 after <filename>bar.service</filename>) and both are
405 requested to start, they will be started in
406 parallel. It is a common pattern that both requirement
407 and ordering dependencies are placed between two
408 units. Also note that the majority of dependencies are
409 implicitly created and maintained by systemd. In most
410 cases it should be unnecessary to declare additional
411 dependencies manually, however it is possible to do
414 <para>Application programs and units (via
415 dependencies) may request state changes of units. In
416 systemd, these requests are encapsulated as 'jobs' and
417 maintained in a job queue. Jobs may succeed or can
418 fail, their execution is ordered based on the ordering
419 dependencies of the units they have been scheduled
422 <para>On boot systemd activates the target unit
423 <filename>default.target</filename> whose job is to
424 activate on-boot services and other on-boot units by
425 pulling them in via dependencies. Usually the unit
426 name is just an alias (symlink) for either
427 <filename>graphical.target</filename> (for
428 fully-featured boots into the UI) or
429 <filename>multi-user.target</filename> (for limited
430 console-only boots for use in embedded or server
431 environments, or similar; a subset of
432 graphical.target). However, it is at the discretion of
433 the administrator to configure it as an alias to any
434 other target unit. See
435 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
436 for details about these target units.</para>
438 <para>Processes systemd spawns are placed in
439 individual Linux control groups named after the unit
440 which they belong to in the private systemd
441 hierarchy. (see <ulink
442 url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
443 for more information about control groups, or short
444 "cgroups"). systemd uses this to effectively keep
445 track of processes. Control group information is
446 maintained in the kernel, and is accessible via the
447 file system hierarchy (beneath
448 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
450 <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
451 (<command>ps xawf -eo pid,user,cgroup,args</command>
452 is particularly useful to list all processes and the
453 systemd units they belong to.).</para>
455 <para>systemd is compatible with the SysV init system
456 to a large degree: SysV init scripts are supported and
457 simply read as an alternative (though limited)
458 configuration file format. The SysV
459 <filename>/dev/initctl</filename> interface is
460 provided, and compatibility implementations of the
461 various SysV client tools are available. In addition to
462 that, various established Unix functionality such as
463 <filename>/etc/fstab</filename> or the
464 <filename>utmp</filename> database are
467 <para>systemd has a minimal transaction system: if a
468 unit is requested to start up or shut down it will add
469 it and all its dependencies to a temporary
470 transaction. Then, it will verify if the transaction
471 is consistent (i.e. whether the ordering of all units
472 is cycle-free). If it is not, systemd will try to fix
473 it up, and removes non-essential jobs from the
474 transaction that might remove the loop. Also, systemd
475 tries to suppress non-essential jobs in the
476 transaction that would stop a running service. Finally
477 it is checked whether the jobs of the transaction
478 contradict jobs that have already been queued, and
479 optionally the transaction is aborted then. If all
480 worked out and the transaction is consistent and
481 minimized in its impact it is merged with all already
482 outstanding jobs and added to the run
483 queue. Effectively this means that before executing a
484 requested operation, systemd will verify that it makes
485 sense, fixing it if possible, and only failing if it
486 really cannot work.</para>
488 <para>Systemd contains native implementations of
489 various tasks that need to be executed as part of the
490 boot process. For example, it sets the hostname or
491 configures the loopback network device. It also sets
492 up and mounts various API file systems, such as
493 <filename>/sys</filename> or
494 <filename>/proc</filename>.</para>
496 <para>For more information about the concepts and
497 ideas behind systemd please refer to the <ulink
498 url="http://0pointer.de/blog/projects/systemd.html">Original
499 Design Document</ulink>.</para>
501 <para>Note that some but not all interfaces provided
502 by systemd are covered by the <ulink
503 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
504 Stability Promise</ulink>.</para>
506 <para>Units may be generated dynamically at boot and
507 system manager reload time, for example based on other
508 configuration files or parameters passed on the kernel
509 command line. For details see the <ulink
510 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generators
511 Specification</ulink>.</para>
513 <para>Systems which invoke systemd in a container
514 or initrd environment should implement the
516 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
517 Interface</ulink> or <ulink
518 url="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd
519 Interface</ulink> specifications, respectively.</para>
523 <title>Directories</title>
527 <term>System unit directories</term>
529 <listitem><para>The systemd system
530 manager reads unit configuration from
531 various directories. Packages that
532 want to install unit files shall place
533 them in the directory returned by
534 <command>pkg-config systemd
535 --variable=systemdsystemunitdir</command>. Other
536 directories checked are
537 <filename>/usr/local/lib/systemd/system</filename>
539 <filename>/usr/lib/systemd/system</filename>. User
540 configuration always takes
541 precedence. <command>pkg-config
543 --variable=systemdsystemconfdir</command>
544 returns the path of the system
545 configuration directory. Packages
546 should alter the content of these
547 directories only with the
548 <command>enable</command> and
549 <command>disable</command> commands of
551 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
552 tool. Full list of directories is provided in
553 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
560 <term>User unit directories</term>
562 <listitem><para>Similar rules apply
564 directories. However, here the <ulink
565 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
566 Base Directory specification</ulink>
568 units. Applications should place their
569 unit files in the directory returned
570 by <command>pkg-config systemd
571 --variable=systemduserunitdir</command>. Global
572 configuration is done in the directory
573 reported by <command>pkg-config
575 --variable=systemduserconfdir</command>. The
576 <command>enable</command> and
577 <command>disable</command> commands of
579 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
580 tool can handle both global (i.e. for
581 all users) and private (for one user)
582 enabling/disabling of
583 units. Full list of directories is provided in
584 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
591 <term>SysV init scripts directory</term>
593 <listitem><para>The location of the
594 SysV init script directory varies
595 between distributions. If systemd
596 cannot find a native unit file for a
597 requested service, it will look for a
598 SysV init script of the same name
600 <filename>.service</filename> suffix
601 removed).</para></listitem>
607 <term>SysV runlevel link farm directory</term>
609 <listitem><para>The location of the
610 SysV runlevel link farm directory
611 varies between distributions. systemd
612 will take the link farm into account
613 when figuring out whether a service
614 shall be enabled. Note that a service
615 unit with a native unit configuration
616 file cannot be started by activating it
617 in the SysV runlevel link
618 farm.</para></listitem>
624 <title>Signals</title>
628 <term><constant>SIGTERM</constant></term>
630 <listitem><para>Upon receiving this
631 signal the systemd system manager
632 serializes its state, reexecutes
633 itself and deserializes the saved
634 state again. This is mostly equivalent
635 to <command>systemctl
636 daemon-reexec</command>.</para>
638 <para>systemd user managers will
640 <filename>exit.target</filename> unit
641 when this signal is received. This is
643 <command>systemctl --user start
644 exit.target</command>.</para></listitem>
648 <term><constant>SIGINT</constant></term>
650 <listitem><para>Upon receiving this
651 signal the systemd system manager will
653 <filename>ctrl-alt-del.target</filename> unit. This
654 is mostly equivalent to
655 <command>systemctl start
656 ctl-alt-del.target</command>.</para>
658 <para>systemd user managers
659 treat this signal the same way as
660 <constant>SIGTERM</constant>.</para></listitem>
664 <term><constant>SIGWINCH</constant></term>
666 <listitem><para>When this signal is
667 received the systemd system manager
669 <filename>kbrequest.target</filename>
670 unit. This is mostly equivalent to
671 <command>systemctl start
672 kbrequest.target</command>.</para>
674 <para>This signal is ignored by
676 managers.</para></listitem>
680 <term><constant>SIGPWR</constant></term>
682 <listitem><para>When this signal is
683 received the systemd manager
685 <filename>sigpwr.target</filename>
686 unit. This is mostly equivalent to
687 <command>systemctl start
688 sigpwr.target</command>.</para></listitem>
692 <term><constant>SIGUSR1</constant></term>
694 <listitem><para>When this signal is
695 received the systemd manager will try
696 to reconnect to the D-Bus
697 bus.</para></listitem>
701 <term><constant>SIGUSR2</constant></term>
703 <listitem><para>When this signal is
704 received the systemd manager will log
705 its complete state in human readable
706 form. The data logged is the same as
707 printed by <command>systemctl
708 dump</command>.</para></listitem>
712 <term><constant>SIGHUP</constant></term>
714 <listitem><para>Reloads the complete
715 daemon configuration. This is mostly
716 equivalent to <command>systemctl
717 daemon-reload</command>.</para></listitem>
721 <term><constant>SIGRTMIN+0</constant></term>
723 <listitem><para>Enters default mode, starts the
724 <filename>default.target</filename>
725 unit. This is mostly equivalent to
726 <command>systemctl start
727 default.target</command>.</para></listitem>
731 <term><constant>SIGRTMIN+1</constant></term>
733 <listitem><para>Enters rescue mode,
735 <filename>rescue.target</filename>
736 unit. This is mostly equivalent to
737 <command>systemctl isolate
738 rescue.target</command>.</para></listitem>
742 <term><constant>SIGRTMIN+2</constant></term>
744 <listitem><para>Enters emergency mode,
746 <filename>emergency.service</filename>
747 unit. This is mostly equivalent to
748 <command>systemctl isolate
749 emergency.service</command>.</para></listitem>
753 <term><constant>SIGRTMIN+3</constant></term>
755 <listitem><para>Halts the machine,
757 <filename>halt.target</filename>
758 unit. This is mostly equivalent to
759 <command>systemctl start
760 halt.target</command>.</para></listitem>
764 <term><constant>SIGRTMIN+4</constant></term>
766 <listitem><para>Powers off the machine,
768 <filename>poweroff.target</filename>
769 unit. This is mostly equivalent to
770 <command>systemctl start
771 poweroff.target</command>.</para></listitem>
775 <term><constant>SIGRTMIN+5</constant></term>
777 <listitem><para>Reboots the machine,
779 <filename>reboot.target</filename>
780 unit. This is mostly equivalent to
781 <command>systemctl start
782 reboot.target</command>.</para></listitem>
786 <term><constant>SIGRTMIN+6</constant></term>
788 <listitem><para>Reboots the machine via kexec,
790 <filename>kexec.target</filename>
791 unit. This is mostly equivalent to
792 <command>systemctl start
793 kexec.target</command>.</para></listitem>
797 <term><constant>SIGRTMIN+13</constant></term>
799 <listitem><para>Immediately halts the machine.</para></listitem>
803 <term><constant>SIGRTMIN+14</constant></term>
805 <listitem><para>Immediately powers off the machine.</para></listitem>
809 <term><constant>SIGRTMIN+15</constant></term>
811 <listitem><para>Immediately reboots the machine.</para></listitem>
815 <term><constant>SIGRTMIN+16</constant></term>
817 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
821 <term><constant>SIGRTMIN+20</constant></term>
823 <listitem><para>Enables display of
824 status messages on the console, as
826 <varname>systemd.show_status=1</varname>
827 on the kernel command
828 line.</para></listitem>
832 <term><constant>SIGRTMIN+21</constant></term>
834 <listitem><para>Disables display of
835 status messages on the console, as
837 <varname>systemd.show_status=0</varname>
838 on the kernel command
839 line.</para></listitem>
843 <term><constant>SIGRTMIN+22</constant></term>
844 <term><constant>SIGRTMIN+23</constant></term>
846 <listitem><para>Sets the log level to
847 <literal>debug</literal>
848 (or <literal>info</literal> on
849 <constant>SIGRTMIN+23</constant>), as
851 <varname>systemd.log_level=debug</varname>
852 (or <varname>systemd.log_level=info</varname>
853 on <constant>SIGRTMIN+23</constant>) on
855 line.</para></listitem>
859 <term><constant>SIGRTMIN+24</constant></term>
861 <listitem><para>Immediately exits the
862 manager (only available for --user
863 instances).</para></listitem>
867 <term><constant>SIGRTMIN+26</constant></term>
868 <term><constant>SIGRTMIN+27</constant></term>
869 <term><constant>SIGRTMIN+28</constant></term>
870 <term><constant>SIGRTMIN+29</constant></term>
872 <listitem><para>Sets the log level to
873 <literal>journal-or-kmsg</literal>
874 (or <literal>console</literal> on
875 <constant>SIGRTMIN+27</constant>,
876 <literal>kmsg</literal> on
877 <constant>SIGRTMIN+28</constant>,
878 or <literal>syslog-or-kmsg</literal>
879 on <constant>SIGRTMIN+29</constant>), as
881 <varname>systemd.log_target=journal-or-kmsg</varname>
882 (or <varname>systemd.log_target=console</varname>
883 on <constant>SIGRTMIN+27</constant>,
884 <varname>systemd.log_target=kmsg</varname>
885 on <constant>SIGRTMIN+28</constant>,
887 <varname>systemd.log_target=syslog-or-kmsg</varname>
888 on <constant>SIGRTMIN+29</constant>) on
890 line.</para></listitem>
896 <title>Environment</title>
898 <variablelist class='environment-variables'>
900 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
901 <listitem><para>systemd reads the
902 log level from this environment
903 variable. This can be overridden with
904 <option>--log-level=</option>.</para></listitem>
908 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
909 <listitem><para>systemd reads the
910 log target from this environment
911 variable. This can be overridden with
912 <option>--log-target=</option>.</para></listitem>
916 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
917 <listitem><para>Controls whether
918 systemd highlights important log
919 messages. This can be overridden with
920 <option>--log-color=</option>.</para></listitem>
924 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
925 <listitem><para>Controls whether
926 systemd prints the code location along
927 with log messages. This can be
929 <option>--log-location=</option>.</para></listitem>
933 <term><varname>$XDG_CONFIG_HOME</varname></term>
934 <term><varname>$XDG_CONFIG_DIRS</varname></term>
935 <term><varname>$XDG_DATA_HOME</varname></term>
936 <term><varname>$XDG_DATA_DIRS</varname></term>
938 <listitem><para>The systemd user
939 manager uses these variables in
940 accordance to the <ulink
941 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
942 Base Directory specification</ulink>
943 to find its configuration.</para></listitem>
947 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
949 <listitem><para>Controls where systemd
951 files.</para></listitem>
955 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
957 <listitem><para>Controls where systemd
958 looks for SysV init scripts.</para></listitem>
962 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
964 <listitem><para>Controls where systemd
965 looks for SysV init script runlevel link
966 farms.</para></listitem>
970 <term><varname>$LISTEN_PID</varname></term>
971 <term><varname>$LISTEN_FDS</varname></term>
973 <listitem><para>Set by systemd for
974 supervised processes during
975 socket-based activation. See
976 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
977 for more information.
982 <term><varname>$NOTIFY_SOCKET</varname></term>
984 <listitem><para>Set by systemd for
985 supervised processes for status and
986 start-up completion notification. See
987 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
988 for more information.
995 <title>Kernel Command Line</title>
997 <para>When run as system instance systemd parses a
998 number of kernel command line
999 arguments<footnote><para>If run inside a Linux
1000 container these arguments may be passed as command
1001 line arguments to systemd itself, next to any of the
1002 command line options listed in the Options section
1003 above. If run outside of Linux containers, these
1004 arguments are parsed from
1005 <filename>/proc/cmdline</filename>
1006 instead.</para></footnote>:</para>
1008 <variablelist class='kernel-commandline-options'>
1010 <term><varname>systemd.unit=</varname></term>
1011 <term><varname>rd.systemd.unit=</varname></term>
1013 <listitem><para>Overrides the unit to
1014 activate on boot. Defaults to
1015 <filename>default.target</filename>. This
1016 may be used to temporarily boot into a
1017 different boot unit, for example
1018 <filename>rescue.target</filename> or
1019 <filename>emergency.service</filename>. See
1020 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1021 for details about these units. The
1022 option prefixed with
1023 <literal>rd.</literal> is honored
1024 only in the initial RAM disk (initrd),
1025 while the one that is not prefixed only
1026 in the main system.</para></listitem>
1030 <term><varname>systemd.dump_core=</varname></term>
1032 <listitem><para>Takes a boolean
1033 argument. If <option>true</option>,
1034 systemd dumps core when it
1035 crashes. Otherwise, no core dump is
1036 created. Defaults to
1037 <option>true</option>.</para></listitem>
1041 <term><varname>systemd.crash_shell=</varname></term>
1043 <listitem><para>Takes a boolean
1044 argument. If <option>true</option>,
1045 systemd spawns a shell when it
1046 crashes. Otherwise, no shell is
1047 spawned. Defaults to
1048 <option>false</option>, for security
1049 reasons, as the shell is not protected
1051 authentication.</para></listitem>
1055 <term><varname>systemd.crash_chvt=</varname></term>
1057 <listitem><para>Takes an integer
1058 argument. If positive systemd
1059 activates the specified virtual
1060 terminal when it crashes. Defaults to
1061 <constant>-1</constant>.</para></listitem>
1065 <term><varname>systemd.confirm_spawn=</varname></term>
1067 <listitem><para>Takes a boolean
1068 argument. If <option>true</option>,
1069 asks for confirmation when spawning
1070 processes. Defaults to
1071 <option>false</option>.</para></listitem>
1075 <term><varname>systemd.show_status=</varname></term>
1077 <listitem><para>Takes a boolean
1078 argument. If <option>true</option>,
1079 shows terse service status updates on
1080 the console during bootup. Defaults to
1081 <option>true</option>, unless
1082 <option>quiet</option> is passed as
1083 kernel command line option in which
1085 <option>false</option>.</para></listitem>
1089 <term><varname>systemd.log_target=</varname></term>
1090 <term><varname>systemd.log_level=</varname></term>
1091 <term><varname>systemd.log_color=</varname></term>
1092 <term><varname>systemd.log_location=</varname></term>
1094 <listitem><para>Controls log output,
1095 with the same effect as the
1096 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1097 environment variables described above.</para></listitem>
1101 <term><varname>systemd.default_standard_output=</varname></term>
1102 <term><varname>systemd.default_standard_error=</varname></term>
1103 <listitem><para>Controls default
1104 standard output and error output for
1105 services, with the same effect as the
1106 <option>--default-standard-output=</option>
1107 and <option>--default-standard-error=</option>
1108 command line arguments described
1109 above, respectively.</para></listitem>
1113 <term><varname>systemd.setenv=</varname></term>
1115 <listitem><para>Takes a string
1116 argument in the form VARIABLE=VALUE.
1117 May be used to set default environment
1118 variables to add to forked child processes.
1119 May be used more than once to set multiple
1120 variables.</para></listitem>
1124 <term><varname>quiet</varname></term>
1126 <listitem><para>Turn off
1127 status output at boot, much like
1128 <varname>systemd.show_status=false</varname>
1129 would. Note that this option is also
1130 read by the kernel itself and disables
1131 kernel log output. Passing this option
1132 hence turns off the usual output from
1133 both the system manager and the kernel.
1138 <term><varname>debug</varname></term>
1140 <listitem><para>Turn on debugging
1141 output. This is equivalent to
1142 <varname>systemd.log_level=debug</varname>.
1143 Note that this option is also read by
1144 the kernel itself and enables kernel
1145 debug output. Passing this option
1146 hence turns on the debug output from
1147 both the system manager and the
1148 kernel.</para></listitem>
1152 <term><varname>-b</varname></term>
1153 <term><varname>emergency</varname></term>
1155 <listitem><para>Boot into emergency
1156 mode. This is equivalent to
1157 <varname>systemd.unit=emergency.target</varname>
1158 and provided for compatibility
1159 reasons and to be easier to type.</para></listitem>
1163 <term><varname>single</varname></term>
1164 <term><varname>s</varname></term>
1165 <term><varname>S</varname></term>
1166 <term><varname>1</varname></term>
1168 <listitem><para>Boot into rescue
1169 mode. This is equivalent to
1170 <varname>systemd.unit=rescue.target</varname>
1171 and provided for compatibility reasons
1173 type.</para></listitem>
1177 <term><varname>2</varname></term>
1178 <term><varname>3</varname></term>
1179 <term><varname>4</varname></term>
1180 <term><varname>5</varname></term>
1182 <listitem><para>Boot into the
1183 specified legacy SysV runlevel. These
1185 <varname>systemd.unit=runlevel2.target</varname>,
1186 <varname>systemd.unit=runlevel3.target</varname>,
1187 <varname>systemd.unit=runlevel4.target</varname>,
1188 and <varname>systemd.unit=runlevel5.target</varname>, respectively,
1189 and provided for compatibility reasons
1191 type.</para></listitem>
1195 <term><varname>locale.LANG=</varname></term>
1196 <term><varname>locale.LANGUAGE=</varname></term>
1197 <term><varname>locale.LC_CTYPE=</varname></term>
1198 <term><varname>locale.LC_NUMERIC=</varname></term>
1199 <term><varname>locale.LC_TIME=</varname></term>
1200 <term><varname>locale.LC_COLLATE=</varname></term>
1201 <term><varname>locale.LC_MONETARY=</varname></term>
1202 <term><varname>locale.LC_MESSAGES=</varname></term>
1203 <term><varname>locale.LC_PAPER=</varname></term>
1204 <term><varname>locale.LC_NAME=</varname></term>
1205 <term><varname>locale.LC_ADDRESS=</varname></term>
1206 <term><varname>locale.LC_TELEPHONE=</varname></term>
1207 <term><varname>locale.LC_MEASUREMENT=</varname></term>
1208 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
1210 <listitem><para>Set the system locale
1211 to use. This overrides the settings in
1212 <filename>/etc/locale.conf</filename>. For
1213 more information see
1214 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1216 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1221 <para>For other kernel command line parameters
1222 understood by components of the core OS, please refer
1224 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
1228 <title>Sockets and FIFOs</title>
1232 <term><filename>/run/systemd/notify</filename></term>
1234 <listitem><para>Daemon status
1235 notification socket. This is an
1236 <constant>AF_UNIX</constant> datagram socket and is used to
1237 implement the daemon notification
1238 logic as implemented by
1239 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1244 <term><filename>/run/systemd/shutdownd</filename></term>
1246 <listitem><para>Used internally by the
1247 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1248 tool to implement delayed
1249 shutdowns. This is an <constant>AF_UNIX</constant> datagram
1250 socket.</para></listitem>
1254 <term><filename>/run/systemd/private</filename></term>
1256 <listitem><para>Used internally as
1257 communication channel between
1258 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1259 and the systemd process. This is an
1260 <constant>AF_UNIX</constant> stream socket. This interface
1261 is private to systemd and should not
1263 projects.</para></listitem>
1267 <term><filename>/dev/initctl</filename></term>
1269 <listitem><para>Limited compatibility
1270 support for the SysV client interface,
1271 as implemented by the
1272 <filename>systemd-initctl.service</filename>
1273 unit. This is a named pipe in the file
1274 system. This interface is obsolete and
1275 should not be used in new
1276 applications.</para></listitem>
1282 <title>See Also</title>
1284 The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
1285 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1286 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1287 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1288 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1289 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1290 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1291 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1292 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1293 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1294 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1295 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1296 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1297 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>