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