]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.xml
man: fix typo in systemd manual page
[thirdparty/systemd.git] / man / systemd.xml
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">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
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 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd">
25
26 <refentryinfo>
27 <title>systemd</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd</refentrytitle>
42 <manvolnum>1</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd</refname>
47 <refname>init</refname>
48 <refpurpose>systemd System and Service Manager</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <cmdsynopsis>
53 <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command>
54 </cmdsynopsis>
55 <cmdsynopsis>
56 <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59
60 <refsect1>
61 <title>Description</title>
62
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>
67
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>
76
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.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
82 for more information.</para>
83 </refsect1>
84
85 <refsect1>
86 <title>Options</title>
87
88 <para>The following options are understood:</para>
89
90 <variablelist>
91 <varlistentry>
92 <term><option>-h</option></term>
93 <term><option>--help</option></term>
94
95 <listitem><para>Prints a short help
96 text and exits.</para></listitem>
97 </varlistentry>
98 <varlistentry>
99 <term><option>--test</option></term>
100
101 <listitem><para>Determine startup
102 sequence, dump it and exit. This is an
103 option useful for debugging
104 only.</para></listitem>
105 </varlistentry>
106 <varlistentry>
107 <term><option>--dump-configuration-items</option></term>
108
109 <listitem><para>Dump understood unit
110 configuration items. This outputs a
111 terse but complete list of
112 configuration items understood in unit
113 definition files.</para></listitem>
114 </varlistentry>
115 <varlistentry>
116 <term><option>--introspect=</option></term>
117
118 <listitem><para>Extract D-Bus
119 interface introspection data. This is
120 mostly useful at install time
121 to generate data suitable for the
122 D-Bus interfaces
123 repository. Optionally the interface
124 name for the introspection data may be
125 specified. If omitted, the
126 introspection data for all interfaces
127 is dumped.</para></listitem>
128 </varlistentry>
129 <varlistentry>
130 <term><option>--unit=</option></term>
131
132 <listitem><para>Set default unit to
133 activate on startup. If not specified
134 defaults to
135 <filename>default.target</filename>.</para></listitem>
136 </varlistentry>
137 <varlistentry>
138 <term><option>--system</option></term>
139 <term><option>--user</option></term>
140
141 <listitem><para>Tell systemd to run a
142 system instance (resp. user
143 instance), even if the process ID is
144 not 1 (resp. is 1), i.e. systemd is
145 not (resp. is) run as init process.
146 Normally it should not be necessary to
147 pass these options, as systemd
148 automatically detects the mode it is
149 started in. These options are hence of
150 little use except for debugging. Note
151 that it is not supported booting and
152 maintaining a full system with systemd
153 running in <option>--system</option>
154 mode, but PID not 1. In practice,
155 passing <option>--system</option> explicitly is
156 only useful in conjunction with
157 <option>--test</option>.</para></listitem>
158 </varlistentry>
159 <varlistentry>
160 <term><option>--dump-core</option></term>
161
162 <listitem><para>Dump core on
163 crash. This switch has no effect when
164 run as user
165 instance.</para></listitem>
166 </varlistentry>
167 <varlistentry>
168 <term><option>--crash-shell</option></term>
169
170 <listitem><para>Run shell on
171 crash. This switch has no effect when
172 run as user
173 instance.</para></listitem>
174 </varlistentry>
175 <varlistentry>
176 <term><option>--confirm-spawn</option></term>
177
178 <listitem><para>Ask for confirmation
179 when spawning processes. This switch
180 has no effect when run as user
181 instance.</para></listitem>
182 </varlistentry>
183 <varlistentry>
184 <term><option>--show-status=</option></term>
185
186 <listitem><para>Show terse service
187 status information while booting. This
188 switch has no effect when run as user
189 instance. Takes a boolean argument
190 which may be omitted which is
191 interpreted as
192 <option>true</option>.</para></listitem>
193 </varlistentry>
194 <varlistentry>
195 <term><option>--sysv-console=</option></term>
196
197 <listitem><para>Controls whether
198 output of SysV init scripts will be
199 directed to the console. This switch
200 has no effect when run as user
201 instance. Takes a boolean argument
202 which may be omitted which is
203 interpreted as
204 <option>true</option>.</para></listitem>
205 </varlistentry>
206 <varlistentry>
207 <term><option>--log-target=</option></term>
208
209 <listitem><para>Set log
210 target. Argument must be one of
211 <option>console</option>,
212 <option>syslog</option>,
213 <option>kmsg</option>,
214 <option>syslog-or-kmsg</option>,
215 <option>null</option>.</para></listitem>
216 </varlistentry>
217 <varlistentry>
218 <term><option>--log-level=</option></term>
219
220 <listitem><para>Set log level. As
221 argument this accepts a numerical log
222 level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
223 symbolic names (lowercase):
224 <option>emerg</option>,
225 <option>alert</option>,
226 <option>crit</option>,
227 <option>err</option>,
228 <option>warning</option>,
229 <option>notice</option>,
230 <option>info</option>,
231 <option>debug</option>.</para></listitem>
232 </varlistentry>
233 <varlistentry>
234 <term><option>--log-color=</option></term>
235
236 <listitem><para>Highlight important
237 log messages. Argument is a boolean
238 value. If the argument is omitted it
239 defaults to
240 <option>true</option>.</para></listitem>
241 </varlistentry>
242 <varlistentry>
243 <term><option>--log-location=</option></term>
244
245 <listitem><para>Include code location
246 in log messages. This is mostly
247 relevant for debugging
248 purposes. Argument is a boolean
249 value. If the argument is omitted
250 it defaults to
251 <option>true</option>.</para></listitem>
252 </varlistentry>
253 <varlistentry>
254 <term><option>--default-standard-output=</option></term>
255 <term><option>--default-standard-error=</option></term>
256
257 <listitem><para>Sets the default
258 output resp. error output for all
259 services and sockets, i.e. controls
260 the default for
261 <option>StandardOutput=</option>
262 resp. <option>StandardError=</option>
263 (see
264 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
265 for details). Takes one of
266 <option>inherit</option>,
267 <option>null</option>,
268 <option>tty</option>,
269 <option>syslog</option>,
270 <option>syslog+console</option>,
271 <option>kmsg</option>,
272 <option>kmsg+console</option>. If the
273 argument is omitted
274 <option>--default-standard-output=</option>
275 defaults to <option>syslog</option>
276 and
277 <option>--default-standard-error=</option>
278 to
279 <option>inherit</option>.</para></listitem>
280 </varlistentry>
281 </variablelist>
282 </refsect1>
283
284 <refsect1>
285 <title>Concepts</title>
286
287 <para>systemd provides a dependency system between
288 various entities called "units". Units encapsulate
289 various objects that are relevant for system boot-up
290 and maintenance. The majority of units are configured
291 in unit configuration files, whose syntax and basic
292 set of options is described in
293 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
294 however some are created automatically from other
295 configuration or dynamically from system state. Units
296 may be 'active' (meaning started, bound, plugged in,
297 ... depending on the unit type, see below), or
298 'inactive' (meaning stopped, unbound, unplugged, ...),
299 as well as in the process of being activated or
300 deactivated, i.e. between the two states (these states
301 are called 'activating', 'deactivating'). A special
302 'failed' state is available as well which is very
303 similar to 'inactive' and is entered when the service
304 failed in some way (process returned error code on
305 exit, or crashed, or an operation timed out). If this
306 state is entered the cause will be logged, for later
307 reference. Note that the various unit types may have a
308 number of additional substates, which are mapped to
309 the five generalized unit states described
310 here.</para>
311
312 <para>The following unit types are available:</para>
313
314 <orderedlist>
315 <listitem><para>Service units, which control
316 daemons and the processes they consist of. For
317 details see
318 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
319
320 <listitem><para>Socket units, which
321 encapsulate local IPC or network sockets in
322 the system, useful for socket-based
323 activation. For details about socket units see
324 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
325 for details on socket-based activation and
326 other forms of activation, see
327 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
328
329 <listitem><para>Target units are useful to
330 group units, or provide well-known
331 synchronization points during boot-up, see
332 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
333
334 <listitem><para>Device units expose kernel
335 devices in systemd and may be used to
336 implement device-based activation. For details
337 see
338 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
339
340 <listitem><para>Mount units control mount
341 points in the file system, for details see
342 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
343
344 <listitem><para>Automount units provide
345 automount capabilities, for on-demand mounting
346 of file systems as well as parallelized
347 boot-up. See
348 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
349
350 <listitem><para>Snapshot units can be used to
351 temporarily save the state of the set of
352 systemd units, which later may be restored by
353 activating the saved snapshot unit. For more
354 information see
355 <citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
356
357 <listitem><para>Timer units are useful for
358 triggering activation of other units based on
359 timers. You may find details in
360 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
361
362 <listitem><para>Swap units are very similar to
363 mount units and encapsulate memory swap
364 partitions or files of the operating
365 system. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
366
367 <listitem><para>Path units may be used
368 to activate other services when file system
369 objects change or are modified. See
370 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
371
372 </orderedlist>
373
374 <para>Units are named as their configuration
375 files. Some units have special semantics. A detailed
376 list is available in
377 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
378
379 <para>systemd knows various kinds of dependencies,
380 including positive and negative requirement
381 dependencies (i.e. <varname>Requires=</varname> and
382 <varname>Conflicts=</varname>) as well as ordering
383 dependencies (<varname>After=</varname> and
384 <varname>Before=</varname>). NB: ordering and
385 requirement dependencies are orthogonal. If only a
386 requirement dependency exists between two units
387 (e.g. <filename>foo.service</filename> requires
388 <filename>bar.service</filename>), but no ordering
389 dependency (e.g. <filename>foo.service</filename>
390 after <filename>bar.service</filename>) and both are
391 requested to start, they will be started in
392 parallel. It is a common pattern that both requirement
393 and ordering dependencies are placed between two
394 units. Also note that the majority of dependencies are
395 implicitly created and maintained by systemd. In most
396 cases it should be unnecessary to declare additional
397 dependencies manually, however it is possible to do
398 this.</para>
399
400 <para>Application programs and units (via
401 dependencies) may request state changes of units. In
402 systemd, these requests are encapsulated as 'jobs' and
403 maintained in a job queue. Jobs may succeed or can
404 fail, their execution is ordered based on the ordering
405 dependencies of the units they have been scheduled
406 for.</para>
407
408 <para>On boot systemd activates the target unit
409 <filename>default.target</filename> whose job is to
410 activate on-boot services and other on-boot units by
411 pulling them in via dependencies. Usually the unit
412 name is just an alias (symlink) for either
413 <filename>graphical.target</filename> (for
414 fully-featured boots into the UI) or
415 <filename>multi-user.target</filename> (for limited
416 console-only boots for use in embedded or server
417 environments, or similar; a subset of
418 graphical.target). However it is at the discretion of
419 the administrator to configure it as an alias to any
420 other target unit. See
421 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
422 for details about these target units.</para>
423
424 <para>Processes systemd spawns are placed in
425 individual Linux control groups named after the unit
426 which they belong to in the private systemd
427 hierarchy. (see <ulink
428 url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>
429 for more information about control groups, or short
430 "cgroups"). systemd uses this to effectively keep
431 track of processes. Control group information is
432 maintained in the kernel, and is accessible via the
433 file system hierarchy (beneath
434 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
435 such as
436 <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
437 (<command>ps xawf -eo pid,user,cgroup,args</command>
438 is particularly useful to list all processes and the
439 systemd units they belong to.).</para>
440
441 <para>systemd is compatible with the SysV init system
442 to a large degree: SysV init scripts are supported and
443 simply read as an alternative (though limited)
444 configuration file format. The SysV
445 <filename>/dev/initctl</filename> interface is
446 provided, and compatibility implementations of the
447 various SysV client tools are available. In addition to
448 that, various established Unix functionality such as
449 <filename>/etc/fstab</filename> or the
450 <filename>utmp</filename> database are
451 supported.</para>
452
453 <para>systemd has a minimal transaction system: if a
454 unit is requested to start up or shut down it will add
455 it and all its dependencies to a temporary
456 transaction. Then, it will verify if the transaction
457 is consistent (i.e. whether the ordering of all units
458 is cycle-free). If it is not, systemd will try to fix
459 it up, and removes non-essential jobs from the
460 transaction that might remove the loop. Also, systemd
461 tries to suppress non-essential jobs in the
462 transaction that would stop a running service. Finally
463 it is checked whether the jobs of the transaction
464 contradict jobs that have already been queued, and
465 optionally the transaction is aborted then. If all
466 worked out and the transaction is consistent and
467 minimized in its impact it is merged with all already
468 outstanding jobs and added to the run
469 queue. Effectively this means that before executing a
470 requested operation, systemd will verify that it makes
471 sense, fixing it if possible, and only failing if it
472 really cannot work.</para>
473
474 <para>Systemd contains native implementations of
475 various tasks that need to be executed as part of the
476 boot process. For example, it sets the host name or
477 configures the loopback network device. It also sets
478 up and mounts various API file systems, such as
479 <filename>/sys</filename> or
480 <filename>/proc</filename>.</para>
481
482 <para>For more information about the concepts and
483 ideas behind systemd please refer to the <ulink
484 url="http://0pointer.de/blog/projects/systemd.html">Original
485 Design Document</ulink>.</para>
486
487 <para>Note that some but not all interfaces provided
488 by systemd are covered by the <ulink
489 url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
490 Stability Promise</ulink>.</para>
491 </refsect1>
492
493 <refsect1>
494 <title>Directories</title>
495
496 <variablelist>
497 <varlistentry>
498 <term>System unit directories</term>
499
500 <listitem><para>The systemd system
501 manager reads unit configuration from
502 various directories. Packages that
503 want to install unit files shall place
504 them in the directory returned by
505 <command>pkg-config systemd
506 --variable=systemdsystemunitdir</command>. Other
507 directories checked are
508 <filename>/usr/local/lib/systemd/system</filename>
509 and
510 <filename>/usr/lib/systemd/system</filename>. User
511 configuration always takes
512 precedence. <command>pkg-config
513 systemd
514 --variable=systemdsystemconfdir</command>
515 returns the path of the system
516 configuration directory. Packages
517 should alter the content of these
518 directories only with the
519 <command>enable</command> and
520 <command>disable</command> commands of
521 the
522 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
523 tool.</para></listitem>
524 </varlistentry>
525 </variablelist>
526
527 <variablelist>
528 <varlistentry>
529 <term>User unit directories</term>
530
531 <listitem><para>Similar rules apply
532 for the user unit
533 directories. However, here the <ulink
534 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
535 Base Directory specification</ulink>
536 is followed to find
537 units. Applications should place their
538 unit files in the directory returned
539 by <command>pkg-config systemd
540 --variable=systemduserunitdir</command>. Global
541 configuration is done in the directory
542 reported by <command>pkg-config
543 systemd
544 --variable=systemduserconfdir</command>. The
545 <command>enable</command> and
546 <command>disable</command> commands of
547 the
548 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
549 tool can handle both global (i.e. for
550 all users) and private (for one user)
551 enabling/disabling of
552 units.</para></listitem>
553 </varlistentry>
554 </variablelist>
555
556 <variablelist>
557 <varlistentry>
558 <term>SysV init scripts directory</term>
559
560 <listitem><para>The location of the
561 SysV init script directory varies
562 between distributions. If systemd
563 cannot find a native unit file for a
564 requested service, it will look for a
565 SysV init script of the same name
566 (with the
567 <filename>.service</filename> suffix
568 removed).</para></listitem>
569 </varlistentry>
570 </variablelist>
571
572 <variablelist>
573 <varlistentry>
574 <term>SysV runlevel link farm directory</term>
575
576 <listitem><para>The location of the
577 SysV runlevel link farm directory
578 varies between distributions. systemd
579 will take the link farm into account
580 when figuring out whether a service
581 shall be enabled. Note that a service
582 unit with a native unit configuration
583 file cannot be started by activating it
584 in the SysV runlevel link
585 farm.</para></listitem>
586 </varlistentry>
587 </variablelist>
588 </refsect1>
589
590 <refsect1>
591 <title>Signals</title>
592
593 <variablelist>
594 <varlistentry>
595 <term>SIGTERM</term>
596
597 <listitem><para>Upon receiving this
598 signal the systemd system manager
599 serializes its state, reexecutes
600 itself and deserializes the saved
601 state again. This is mostly equivalent
602 to <command>systemctl
603 daemon-reexec</command>.</para>
604
605 <para>systemd user managers will
606 start the
607 <filename>exit.target</filename> unit
608 when this signal is received. This is
609 mostly equivalent to
610 <command>systemctl --user start
611 exit.target</command>.</para></listitem>
612 </varlistentry>
613
614 <varlistentry>
615 <term>SIGINT</term>
616
617 <listitem><para>Upon receiving this
618 signal the systemd system manager will
619 start the
620 <filename>ctrl-alt-del.target</filename> unit. This
621 is mostly equivalent to
622 <command>systemctl start
623 ctl-alt-del.target</command>.</para>
624
625 <para>systemd user managers
626 treat this signal the same way as
627 SIGTERM.</para></listitem>
628 </varlistentry>
629
630 <varlistentry>
631 <term>SIGWINCH</term>
632
633 <listitem><para>When this signal is
634 received the systemd system manager
635 will start the
636 <filename>kbrequest.target</filename>
637 unit. This is mostly equivalent to
638 <command>systemctl start
639 kbrequest.target</command>.</para>
640
641 <para>This signal is ignored by
642 systemd user
643 managers.</para></listitem>
644 </varlistentry>
645
646 <varlistentry>
647 <term>SIGPWR</term>
648
649 <listitem><para>When this signal is
650 received the systemd manager
651 will start the
652 <filename>sigpwr.target</filename>
653 unit. This is mostly equivalent to
654 <command>systemctl start
655 sigpwr.target</command>.</para></listitem>
656 </varlistentry>
657
658 <varlistentry>
659 <term>SIGUSR1</term>
660
661 <listitem><para>When this signal is
662 received the systemd manager will try
663 to reconnect to the D-Bus
664 bus.</para></listitem>
665 </varlistentry>
666
667 <varlistentry>
668 <term>SIGUSR2</term>
669
670 <listitem><para>When this signal is
671 received the systemd manager will log
672 its complete state in human readable
673 form. The data logged is the same as
674 printed by <command>systemctl
675 dump</command>.</para></listitem>
676 </varlistentry>
677
678 <varlistentry>
679 <term>SIGHUP</term>
680
681 <listitem><para>Reloads the complete
682 daemon configuration. This is mostly
683 equivalent to <command>systemctl
684 daemon-reload</command>.</para></listitem>
685 </varlistentry>
686
687 <varlistentry>
688 <term>SIGRTMIN+0</term>
689
690 <listitem><para>Enters default mode, starts the
691 <filename>default.target</filename>
692 unit. This is mostly equivalent to
693 <command>systemctl start
694 default.target</command>.</para></listitem>
695 </varlistentry>
696
697 <varlistentry>
698 <term>SIGRTMIN+1</term>
699
700 <listitem><para>Enters rescue mode,
701 starts the
702 <filename>rescue.target</filename>
703 unit. This is mostly equivalent to
704 <command>systemctl isolate
705 rescue.target</command>.</para></listitem>
706 </varlistentry>
707
708 <varlistentry>
709 <term>SIGRTMIN+2</term>
710
711 <listitem><para>Enters emergency mode,
712 starts the
713 <filename>emergency.service</filename>
714 unit. This is mostly equivalent to
715 <command>systemctl isolate
716 emergency.service</command>.</para></listitem>
717 </varlistentry>
718
719 <varlistentry>
720 <term>SIGRTMIN+3</term>
721
722 <listitem><para>Halts the machine,
723 starts the
724 <filename>halt.target</filename>
725 unit. This is mostly equivalent to
726 <command>systemctl start
727 halt.target</command>.</para></listitem>
728 </varlistentry>
729
730 <varlistentry>
731 <term>SIGRTMIN+4</term>
732
733 <listitem><para>Powers off the machine,
734 starts the
735 <filename>poweroff.target</filename>
736 unit. This is mostly equivalent to
737 <command>systemctl start
738 poweroff.target</command>.</para></listitem>
739 </varlistentry>
740
741 <varlistentry>
742 <term>SIGRTMIN+5</term>
743
744 <listitem><para>Reboots the machine,
745 starts the
746 <filename>reboot.target</filename>
747 unit. This is mostly equivalent to
748 <command>systemctl start
749 reboot.target</command>.</para></listitem>
750 </varlistentry>
751
752 <varlistentry>
753 <term>SIGRTMIN+6</term>
754
755 <listitem><para>Reboots the machine via kexec,
756 starts the
757 <filename>kexec.target</filename>
758 unit. This is mostly equivalent to
759 <command>systemctl start
760 kexec.target</command>.</para></listitem>
761 </varlistentry>
762
763 <varlistentry>
764 <term>SIGRTMIN+13</term>
765
766 <listitem><para>Immediately halts the machine.</para></listitem>
767 </varlistentry>
768
769 <varlistentry>
770 <term>SIGRTMIN+14</term>
771
772 <listitem><para>Immediately powers off the machine.</para></listitem>
773 </varlistentry>
774
775 <varlistentry>
776 <term>SIGRTMIN+15</term>
777
778 <listitem><para>Immediately reboots the machine.</para></listitem>
779 </varlistentry>
780
781 <varlistentry>
782 <term>SIGRTMIN+16</term>
783
784 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
785 </varlistentry>
786
787 <varlistentry>
788 <term>SIGRTMIN+20</term>
789
790 <listitem><para>Enables display of
791 status messages on the console, as
792 controlled via
793 <varname>systemd.show_status=1</varname>
794 on the kernel command
795 line.</para></listitem>
796 </varlistentry>
797
798 <varlistentry>
799 <term>SIGRTMIN+21</term>
800
801 <listitem><para>Disables display of
802 status messages on the console, as
803 controlled via
804 <varname>systemd.show_status=0</varname>
805 on the kernel command
806 line.</para></listitem>
807 </varlistentry>
808
809 <varlistentry>
810 <term>SIGRTMIN+22</term>
811 <term>SIGRTMIN+23</term>
812
813 <listitem><para>Sets the log level to
814 <literal>debug</literal>
815 (resp. <literal>info</literal> on
816 <literal>SIGRTMIN+32</literal>), as
817 controlled via
818 <varname>systemd.log_level=debug</varname>
819 (resp. <varname>systemd.log_level=info</varname>
820 on <literal>SIGRTMIN+23</literal>) on
821 the kernel command
822 line.</para></listitem>
823 </varlistentry>
824
825 <varlistentry>
826 <term>SIGRTMIN+27</term>
827 <term>SIGRTMIN+28</term>
828 <term>SIGRTMIN+29</term>
829
830 <listitem><para>Sets the log level to
831 <literal>console</literal>
832 (resp. <literal>kmsg</literal> on
833 <literal>SIGRTMIN+28</literal>;
834 resp. <literal>syslog-or-kmsg</literal>
835 on <literal>SIGRTMIN+29</literal>), as
836 controlled via
837 <varname>systemd.log_target=console</varname>
838 (resp. <varname>systemd.log_target=kmsg</varname>
839 on <literal>SIGRTMIN+28</literal>;
840 resp
841 <varname>systemd.log_target=syslog-or-kmsg</varname>
842 on <literal>SIGRTMIN+29</literal>) on
843 the kernel command
844 line.</para></listitem>
845 </varlistentry>
846 </variablelist>
847 </refsect1>
848
849 <refsect1>
850 <title>Environment</title>
851
852 <variablelist>
853 <varlistentry>
854 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
855 <listitem><para>systemd reads the
856 log level from this environment
857 variable. This can be overridden with
858 <option>--log-level=</option>.</para></listitem>
859 </varlistentry>
860
861 <varlistentry>
862 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
863 <listitem><para>systemd reads the
864 log target from this environment
865 variable. This can be overridden with
866 <option>--log-target=</option>.</para></listitem>
867 </varlistentry>
868
869 <varlistentry>
870 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
871 <listitem><para>Controls whether
872 systemd highlights important log
873 messages. This can be overridden with
874 <option>--log-color=</option>.</para></listitem>
875 </varlistentry>
876
877 <varlistentry>
878 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
879 <listitem><para>Controls whether
880 systemd prints the code location along
881 with log messages. This can be
882 overridden with
883 <option>--log-location=</option>.</para></listitem>
884 </varlistentry>
885
886 <varlistentry>
887 <term><varname>$XDG_CONFIG_HOME</varname></term>
888 <term><varname>$XDG_CONFIG_DIRS</varname></term>
889 <term><varname>$XDG_DATA_HOME</varname></term>
890 <term><varname>$XDG_DATA_DIRS</varname></term>
891
892 <listitem><para>The systemd user
893 manager uses these variables in
894 accordance to the <ulink
895 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
896 Base Directory specification</ulink>
897 to find its configuration.</para></listitem>
898 </varlistentry>
899
900 <varlistentry>
901 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
902
903 <listitem><para>Controls where systemd
904 looks for unit
905 files.</para></listitem>
906 </varlistentry>
907
908 <varlistentry>
909 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
910
911 <listitem><para>Controls where systemd
912 looks for SysV init scripts.</para></listitem>
913 </varlistentry>
914
915 <varlistentry>
916 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
917
918 <listitem><para>Controls where systemd
919 looks for SysV init script runlevel link
920 farms.</para></listitem>
921 </varlistentry>
922
923 <varlistentry>
924 <term><varname>$LISTEN_PID</varname></term>
925 <term><varname>$LISTEN_FDS</varname></term>
926
927 <listitem><para>Set by systemd for
928 supervised processes during
929 socket-based activation. See
930 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
931 for more information.
932 </para></listitem>
933 </varlistentry>
934
935 <varlistentry>
936 <term><varname>$NOTIFY_SOCKET</varname></term>
937
938 <listitem><para>Set by systemd for
939 supervised processes for status and
940 start-up completion notification. See
941 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
942 for more information.
943 </para></listitem>
944 </varlistentry>
945 </variablelist>
946 </refsect1>
947
948 <refsect1>
949 <title>Kernel Command Line</title>
950
951 <para>When run as system instance systemd parses a few kernel command line arguments:</para>
952
953 <variablelist>
954 <varlistentry>
955 <term><varname>systemd.unit=</varname></term>
956
957 <listitem><para>Overrides the unit to
958 activate on boot. Defaults to
959 <filename>default.target</filename>. This
960 may be used to temporarily boot into a
961 different boot unit, for example
962 <filename>rescue.target</filename> or
963 <filename>emergency.service</filename>. See
964 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
965 for details about these
966 units.</para></listitem>
967 </varlistentry>
968
969 <varlistentry>
970 <term><varname>systemd.dump_core=</varname></term>
971
972 <listitem><para>Takes a boolean
973 argument. If <option>true</option>
974 systemd dumps core when it
975 crashes. Otherwise no core dump is
976 created. Defaults to
977 <option>true</option>.</para></listitem>
978 </varlistentry>
979
980 <varlistentry>
981 <term><varname>systemd.crash_shell=</varname></term>
982
983 <listitem><para>Takes a boolean
984 argument. If <option>true</option>
985 systemd spawns a shell when it
986 crashes. Otherwise no shell is
987 spawned. Defaults to
988 <option>false</option>, for security
989 reasons, as the shell is not protected
990 by any password
991 authentication.</para></listitem>
992 </varlistentry>
993
994 <varlistentry>
995 <term><varname>systemd.crash_chvt=</varname></term>
996
997 <listitem><para>Takes an integer
998 argument. If positive systemd
999 activates the specified virtual
1000 terminal when it crashes. Defaults to
1001 <literal>-1</literal>.</para></listitem>
1002 </varlistentry>
1003
1004 <varlistentry>
1005 <term><varname>systemd.confirm_spawn=</varname></term>
1006
1007 <listitem><para>Takes a boolean
1008 argument. If <option>true</option>
1009 asks for confirmation when spawning
1010 processes. Defaults to
1011 <option>false</option>.</para></listitem>
1012 </varlistentry>
1013
1014 <varlistentry>
1015 <term><varname>systemd.show_status=</varname></term>
1016
1017 <listitem><para>Takes a boolean
1018 argument. If <option>true</option>
1019 shows terse service status updates on
1020 the console during bootup. Defaults to
1021 <option>true</option>.</para></listitem>
1022 </varlistentry>
1023
1024 <varlistentry>
1025 <term><varname>systemd.sysv_console=</varname></term>
1026
1027 <listitem><para>Takes a boolean
1028 argument. If <option>true</option>
1029 output of SysV init scripts will be
1030 directed to the console. Defaults to
1031 <option>true</option>, unless
1032 <option>quiet</option> is passed as
1033 kernel command line option in which
1034 case it defaults to
1035 <option>false</option>.</para></listitem>
1036 </varlistentry>
1037
1038 <varlistentry>
1039 <term><varname>systemd.log_target=</varname></term>
1040 <term><varname>systemd.log_level=</varname></term>
1041 <term><varname>systemd.log_color=</varname></term>
1042 <term><varname>systemd.log_location=</varname></term>
1043
1044 <listitem><para>Controls log output,
1045 with the same effect as the
1046 <varname>$SYSTEMD_LOG_TARGET</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, <varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LOCATION</varname>
1047 environment variables described above.</para></listitem>
1048 </varlistentry>
1049
1050 <varlistentry>
1051 <term><varname>systemd.default_standard_output=</varname></term>
1052 <term><varname>systemd.default_standard_error=</varname></term>
1053 <listitem><para>Controls default
1054 standard output/error output for
1055 services, with the same effect as the
1056 <option>--default-standard-output=</option>
1057 resp. <option>--default-standard-error=</option>
1058 command line arguments described
1059 above.</para></listitem>
1060 </varlistentry>
1061
1062 </variablelist>
1063 </refsect1>
1064
1065 <refsect1>
1066 <title>Sockets and FIFOs</title>
1067
1068 <variablelist>
1069 <varlistentry>
1070 <term><filename>/run/systemd/notify</filename></term>
1071
1072 <listitem><para>Daemon status
1073 notification socket. This is an
1074 AF_UNIX datagram socket and is used to
1075 implement the daemon notification
1076 logic as implemented by
1077 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1078
1079 </varlistentry>
1080
1081 <varlistentry>
1082 <term><filename>/run/systemd/stdout-syslog-bridge</filename></term>
1083
1084 <listitem><para>Used internally by the
1085 <filename>systemd-stdout-syslog-bridge.service</filename>
1086 unit to connect STDOUT and/or STDERR
1087 of spawned processes to
1088 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
1089 or the kernel log buffer. This is an
1090 AF_UNIX stream
1091 socket.</para></listitem>
1092 </varlistentry>
1093
1094 <varlistentry>
1095 <term><filename>/run/systemd/shutdownd</filename></term>
1096
1097 <listitem><para>Used internally by the
1098 <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1099 tool to implement delayed
1100 shutdowns. This is an AF_UNIX datagram
1101 socket.</para></listitem>
1102 </varlistentry>
1103
1104 <varlistentry>
1105 <term><filename>/run/systemd/private</filename></term>
1106
1107 <listitem><para>Used internally as
1108 communication channel between
1109 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1110 and the systemd process. This is an
1111 AF_UNIX stream socket. This interface
1112 is private to systemd and should not
1113 be used in external
1114 projects.</para></listitem>
1115 </varlistentry>
1116
1117 <varlistentry>
1118 <term><filename>/dev/initctl</filename></term>
1119
1120 <listitem><para>Limited compatibility
1121 support for the SysV client interface,
1122 as implemented by the
1123 <filename>systemd-initctl.service</filename>
1124 unit. This is a named pipe in the file
1125 system. This interface is obsolete and
1126 should not be used in new
1127 applications.</para></listitem>
1128 </varlistentry>
1129 </variablelist>
1130 </refsect1>
1131
1132 <refsect1>
1133 <title>See Also</title>
1134 <para>
1135 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1136 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1137 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1138 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1139 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1140 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1141 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1142 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1143 </para>
1144 </refsect1>
1145
1146 </refentry>