]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.xml
man: change noindex="true" to index="false"
[thirdparty/systemd.git] / man / systemd.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
9e632bf7 5
dfdebb1b 6<refentry id="systemd"
798d3a52
ZJS
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd</title>
11 <productname>systemd</productname>
798d3a52
ZJS
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd</refentrytitle>
16 <manvolnum>1</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd</refname>
21 <refname>init</refname>
22 <refpurpose>systemd system and service manager</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <cmdsynopsis>
b57b372a 27 <command>/usr/lib/systemd/systemd</command>
770c4777 28 <arg choice="opt" rep="repeat">OPTIONS</arg>
798d3a52
ZJS
29 </cmdsynopsis>
30 <cmdsynopsis>
770c4777
ZJS
31 <command>init</command>
32 <arg choice="opt" rep="repeat">OPTIONS</arg>
33 <arg choice="req">COMMAND</arg>
798d3a52
ZJS
34 </cmdsynopsis>
35 </refsynopsisdiv>
36
37 <refsect1>
38 <title>Description</title>
39
c035f376
ZJS
40 <para>systemd is a system and service manager for Linux operating systems. When run as first process on
41 boot (as PID 1), it acts as init system that brings up and maintains userspace services. Seperate
42 instances are started for logged-in users to start their services.</para>
43
44 <para><command>systemd</command> is usually not invoked directly by the user, but is installed as the
45 <filename>/sbin/init</filename> symlink and started during early boot. The user manager instances are
46 started automatically through the
47 <citerefentry><refentrytitle>user@.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
48 service.</para>
49
50 <para>For compatibility with SysV, if the binary is called as <command>init</command> and is not the
51 first process on the machine (PID is not 1), it will execute <command>telinit</command> and pass all
52 command line arguments unmodified. That means <command>init</command> and <command>telinit</command> are
53 mostly equivalent when invoked from normal login sessions. See
54 <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more
55 information.</para>
798d3a52
ZJS
56
57 <para>When run as a system instance, systemd interprets the
58 configuration file <filename>system.conf</filename> and the files
59 in <filename>system.conf.d</filename> directories; when run as a
60 user instance, systemd interprets the configuration file
61 <filename>user.conf</filename> and the files in
62 <filename>user.conf.d</filename> directories. See
63 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
64 for more information.</para>
65 </refsect1>
66
798d3a52
ZJS
67 <refsect1>
68 <title>Concepts</title>
69
70 <para>systemd provides a dependency system between various
19f0cf65 71 entities called "units" of 11 different types. Units encapsulate
798d3a52
ZJS
72 various objects that are relevant for system boot-up and
73 maintenance. The majority of units are configured in unit
74 configuration files, whose syntax and basic set of options is
75 described in
76 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
77 however some are created automatically from other configuration,
78 dynamically from system state or programmatically at runtime.
1eecafb8 79 Units may be "active" (meaning started, bound, plugged in, …,
798d3a52 80 depending on the unit type, see below), or "inactive" (meaning
1eecafb8 81 stopped, unbound, unplugged, …), as well as in the process of
798d3a52
ZJS
82 being activated or deactivated, i.e. between the two states (these
83 states are called "activating", "deactivating"). A special
84 "failed" state is available as well, which is very similar to
85 "inactive" and is entered when the service failed in some way
bd2538b5
KBM
86 (process returned error code on exit, or crashed, an operation
87 timed out, or after too many restarts). If this state is entered,
88 the cause will be logged, for later reference. Note that the
89 various unit types may have a number of additional substates,
90 which are mapped to the five generalized unit states described
91 here.</para>
798d3a52
ZJS
92
93 <para>The following unit types are available:</para>
94
95 <orderedlist>
96 <listitem><para>Service units, which start and control daemons
b938cb90 97 and the processes they consist of. For details, see
798d3a52
ZJS
98 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
99
100 <listitem><para>Socket units, which encapsulate local IPC or
101 network sockets in the system, useful for socket-based
b938cb90 102 activation. For details about socket units, see
798d3a52
ZJS
103 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
104 for details on socket-based activation and other forms of
105 activation, see
106 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem>
107
108 <listitem><para>Target units are useful to group units, or
109 provide well-known synchronization points during boot-up, see
110 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
111
112 <listitem><para>Device units expose kernel devices in systemd
113 and may be used to implement device-based activation. For
b938cb90 114 details, see
798d3a52
ZJS
115 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
116
117 <listitem><para>Mount units control mount points in the file
118 system, for details see
119 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
120
121 <listitem><para>Automount units provide automount capabilities,
122 for on-demand mounting of file systems as well as parallelized
123 boot-up. See
124 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
798d3a52
ZJS
125
126 <listitem><para>Timer units are useful for triggering activation
127 of other units based on timers. You may find details in
128 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
129
130 <listitem><para>Swap units are very similar to mount units and
131 encapsulate memory swap partitions or files of the operating
132 system. They are described in
133 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
134
135 <listitem><para>Path units may be used to activate other
136 services when file system objects change or are modified. See
137 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
138
139 <listitem><para>Slice units may be used to group units which
140 manage system processes (such as service and scope units) in a
141 hierarchical tree for resource management purposes. See
142 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
143
144 <listitem><para>Scope units are similar to service units, but
145 manage foreign processes instead of starting them as well. See
146 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
147
148 </orderedlist>
149
150 <para>Units are named as their configuration files. Some units
151 have special semantics. A detailed list is available in
152 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
153
154 <para>systemd knows various kinds of dependencies, including
155 positive and negative requirement dependencies (i.e.
156 <varname>Requires=</varname> and <varname>Conflicts=</varname>) as
157 well as ordering dependencies (<varname>After=</varname> and
158 <varname>Before=</varname>). NB: ordering and requirement
159 dependencies are orthogonal. If only a requirement dependency
160 exists between two units (e.g. <filename>foo.service</filename>
161 requires <filename>bar.service</filename>), but no ordering
162 dependency (e.g. <filename>foo.service</filename> after
163 <filename>bar.service</filename>) and both are requested to start,
164 they will be started in parallel. It is a common pattern that both
165 requirement and ordering dependencies are placed between two
166 units. Also note that the majority of dependencies are implicitly
167 created and maintained by systemd. In most cases, it should be
168 unnecessary to declare additional dependencies manually, however
169 it is possible to do this.</para>
170
171 <para>Application programs and units (via dependencies) may
172 request state changes of units. In systemd, these requests are
173 encapsulated as 'jobs' and maintained in a job queue. Jobs may
174 succeed or can fail, their execution is ordered based on the
175 ordering dependencies of the units they have been scheduled
176 for.</para>
177
178 <para>On boot systemd activates the target unit
179 <filename>default.target</filename> whose job is to activate
180 on-boot services and other on-boot units by pulling them in via
b938cb90 181 dependencies. Usually, the unit name is just an alias (symlink) for
798d3a52
ZJS
182 either <filename>graphical.target</filename> (for fully-featured
183 boots into the UI) or <filename>multi-user.target</filename> (for
184 limited console-only boots for use in embedded or server
185 environments, or similar; a subset of graphical.target). However,
186 it is at the discretion of the administrator to configure it as an
187 alias to any other target unit. See
188 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
189 for details about these target units.</para>
190
e5b62c9b
LP
191 <para>systemd only keeps a minimal set of units loaded into memory. Specifically, the only units that are kept
192 loaded into memory are those for which at least one of the following conditions is true:</para>
193
194 <orderedlist>
05d4db20 195 <listitem><para>It is in an active, activating, deactivating or failed state (i.e. in any unit state except for <literal>inactive</literal>)</para></listitem>
e5b62c9b
LP
196 <listitem><para>It has a job queued for it</para></listitem>
197 <listitem><para>It is a dependency of some sort of at least one other unit that is loaded into memory</para></listitem>
198 <listitem><para>It has some form of resource still allocated (e.g. a service unit that is inactive but for which
199 a process is still lingering that ignored the request to be terminated)</para></listitem>
200 <listitem><para>It has been pinned into memory programmatically by a D-Bus call</para></listitem>
201 </orderedlist>
202
203 <para>systemd will automatically and implicitly load units from disk — if they are not loaded yet — as soon as
204 operations are requested for them. Thus, in many respects, the fact whether a unit is loaded or not is invisible to
205 clients. Use <command>systemctl list-units --all</command> to comprehensively list all units currently loaded. Any
206 unit for which none of the conditions above applies is promptly unloaded. Note that when a unit is unloaded from
207 memory its accounting data is flushed out too. However, this data is generally not lost, as a journal log record
208 is generated declaring the consumed resources whenever a unit shuts down.</para>
209
798d3a52
ZJS
210 <para>Processes systemd spawns are placed in individual Linux
211 control groups named after the unit which they belong to in the
212 private systemd hierarchy. (see <ulink
3c887f97 213 url="https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt">cgroups.txt</ulink>
798d3a52
ZJS
214 for more information about control groups, or short "cgroups").
215 systemd uses this to effectively keep track of processes. Control
216 group information is maintained in the kernel, and is accessible
217 via the file system hierarchy (beneath
218 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools such as
f4b8163b
EV
219 <citerefentry project='man-pages'><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>
220 or
798d3a52
ZJS
221 <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
222 (<command>ps xawf -eo pid,user,cgroup,args</command> is
223 particularly useful to list all processes and the systemd units
224 they belong to.).</para>
225
226 <para>systemd is compatible with the SysV init system to a large
227 degree: SysV init scripts are supported and simply read as an
228 alternative (though limited) configuration file format. The SysV
229 <filename>/dev/initctl</filename> interface is provided, and
230 compatibility implementations of the various SysV client tools are
231 available. In addition to that, various established Unix
232 functionality such as <filename>/etc/fstab</filename> or the
233 <filename>utmp</filename> database are supported.</para>
234
235 <para>systemd has a minimal transaction system: if a unit is
236 requested to start up or shut down it will add it and all its
237 dependencies to a temporary transaction. Then, it will verify if
238 the transaction is consistent (i.e. whether the ordering of all
239 units is cycle-free). If it is not, systemd will try to fix it up,
240 and removes non-essential jobs from the transaction that might
241 remove the loop. Also, systemd tries to suppress non-essential
242 jobs in the transaction that would stop a running service. Finally
243 it is checked whether the jobs of the transaction contradict jobs
244 that have already been queued, and optionally the transaction is
245 aborted then. If all worked out and the transaction is consistent
246 and minimized in its impact it is merged with all already
247 outstanding jobs and added to the run queue. Effectively this
248 means that before executing a requested operation, systemd will
249 verify that it makes sense, fixing it if possible, and only
250 failing if it really cannot work.</para>
92e29d82 251
05d4db20
JK
252 <para>Note that transactions are generated independently of a unit's
253 state at runtime, hence, for example, if a start job is requested on an
254 already started unit, it will still generate a transaction and wake up any
255 inactive dependencies (and cause propagation of other jobs as per the
256 defined relationships). This is because the enqueued job is at the time of
257 execution compared to the target unit's state and is marked successful and
258 complete when both satisfy. However, this job also pulls in other
259 dependencies due to the defined relationships and thus leads to, in our
260 our example, start jobs for any of those inactive units getting queued as
261 well.</para>
798d3a52 262
f95b0be7 263 <para>systemd contains native implementations of various tasks
798d3a52
ZJS
264 that need to be executed as part of the boot process. For example,
265 it sets the hostname or configures the loopback network device. It
266 also sets up and mounts various API file systems, such as
267 <filename>/sys</filename> or <filename>/proc</filename>.</para>
268
269 <para>For more information about the concepts and
270 ideas behind systemd, please refer to the
271 <ulink url="http://0pointer.de/blog/projects/systemd.html">Original Design Document</ulink>.</para>
272
273 <para>Note that some but not all interfaces provided
274 by systemd are covered by the
28a0ad81 275 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
798d3a52
ZJS
276 Stability Promise</ulink>.</para>
277
278 <para>Units may be generated dynamically at boot and system
279 manager reload time, for example based on other configuration
b938cb90 280 files or parameters passed on the kernel command line. For details, see
b1c1a519 281 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
798d3a52
ZJS
282
283 <para>Systems which invoke systemd in a container or initrd
284 environment should implement the
28a0ad81
DR
285 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container Interface</ulink> or
286 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/InitrdInterface">initrd Interface</ulink>
798d3a52
ZJS
287 specifications, respectively.</para>
288 </refsect1>
289
290 <refsect1>
291 <title>Directories</title>
292
293 <variablelist>
294 <varlistentry>
295 <term>System unit directories</term>
296
297 <listitem><para>The systemd system manager reads unit
298 configuration from various directories. Packages that want to
299 install unit files shall place them in the directory returned
300 by <command>pkg-config systemd
301 --variable=systemdsystemunitdir</command>. Other directories
302 checked are <filename>/usr/local/lib/systemd/system</filename>
12b42c76 303 and <filename>/usr/lib/systemd/system</filename>. User
798d3a52
ZJS
304 configuration always takes precedence. <command>pkg-config
305 systemd --variable=systemdsystemconfdir</command> returns the
306 path of the system configuration directory. Packages should
307 alter the content of these directories only with the
308 <command>enable</command> and <command>disable</command>
309 commands of the
310 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
311 tool. Full list of directories is provided in
312 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
313 </para></listitem>
314 </varlistentry>
315 </variablelist>
316
317 <variablelist>
318 <varlistentry>
319 <term>User unit directories</term>
320
321 <listitem><para>Similar rules apply for the user unit
322 directories. However, here the
323 <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
324 Base Directory specification</ulink> is followed to find
325 units. Applications should place their unit files in the
326 directory returned by <command>pkg-config systemd
327 --variable=systemduserunitdir</command>. Global configuration
328 is done in the directory reported by <command>pkg-config
329 systemd --variable=systemduserconfdir</command>. The
330 <command>enable</command> and <command>disable</command>
331 commands of the
332 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
333 tool can handle both global (i.e. for all users) and private
334 (for one user) enabling/disabling of units. Full list of
335 directories is provided in
336 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
337 </para></listitem>
338 </varlistentry>
339 </variablelist>
340
341 <variablelist>
342 <varlistentry>
343 <term>SysV init scripts directory</term>
344
345 <listitem><para>The location of the SysV init script directory
346 varies between distributions. If systemd cannot find a native
347 unit file for a requested service, it will look for a SysV
348 init script of the same name (with the
349 <filename>.service</filename> suffix
350 removed).</para></listitem>
351 </varlistentry>
352 </variablelist>
353
354 <variablelist>
355 <varlistentry>
356 <term>SysV runlevel link farm directory</term>
357
358 <listitem><para>The location of the SysV runlevel link farm
359 directory varies between distributions. systemd will take the
360 link farm into account when figuring out whether a service
361 shall be enabled. Note that a service unit with a native unit
362 configuration file cannot be started by activating it in the
363 SysV runlevel link farm.</para></listitem>
364 </varlistentry>
365 </variablelist>
366 </refsect1>
367
368 <refsect1>
369 <title>Signals</title>
370
371 <variablelist>
372 <varlistentry>
373 <term><constant>SIGTERM</constant></term>
374
375 <listitem><para>Upon receiving this signal the systemd system
376 manager serializes its state, reexecutes itself and
377 deserializes the saved state again. This is mostly equivalent
378 to <command>systemctl daemon-reexec</command>.</para>
379
380 <para>systemd user managers will start the
381 <filename>exit.target</filename> unit when this signal is
382 received. This is mostly equivalent to <command>systemctl
d60cb656 383 --user start exit.target
27e64442 384 --job-mode=replace-irreversibly</command>.</para></listitem>
798d3a52
ZJS
385 </varlistentry>
386
387 <varlistentry>
388 <term><constant>SIGINT</constant></term>
389
84afbbcf
ZJS
390 <listitem><para>Upon receiving this signal the systemd system manager will start the
391 <filename>ctrl-alt-del.target</filename> unit. This is mostly equivalent to
27e64442 392 <command>systemctl start ctrl-alt-del.target --job-mode=replace-irreversibly</command>. If
84afbbcf
ZJS
393 this signal is received more than 7 times per 2s, an immediate reboot is triggered. Note
394 that pressing
395 <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> on the
396 console will trigger this signal. Hence, if a reboot is hanging, pressing
397 <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> more than
398 7 times in 2 seconds is a relatively safe way to trigger an immediate reboot.</para>
798d3a52
ZJS
399
400 <para>systemd user managers treat this signal the same way as
401 <constant>SIGTERM</constant>.</para></listitem>
402 </varlistentry>
403
404 <varlistentry>
405 <term><constant>SIGWINCH</constant></term>
406
407 <listitem><para>When this signal is received the systemd
408 system manager will start the
409 <filename>kbrequest.target</filename> unit. This is mostly
410 equivalent to <command>systemctl start
411 kbrequest.target</command>.</para>
412
413 <para>This signal is ignored by systemd user
414 managers.</para></listitem>
415 </varlistentry>
416
417 <varlistentry>
418 <term><constant>SIGPWR</constant></term>
419
420 <listitem><para>When this signal is received the systemd
421 manager will start the <filename>sigpwr.target</filename>
422 unit. This is mostly equivalent to <command>systemctl start
423 sigpwr.target</command>.</para></listitem>
424 </varlistentry>
425
426 <varlistentry>
427 <term><constant>SIGUSR1</constant></term>
428
429 <listitem><para>When this signal is received the systemd
430 manager will try to reconnect to the D-Bus
431 bus.</para></listitem>
432 </varlistentry>
433
434 <varlistentry>
435 <term><constant>SIGUSR2</constant></term>
436
437 <listitem><para>When this signal is received the systemd
b938cb90 438 manager will log its complete state in human-readable form.
798d3a52
ZJS
439 The data logged is the same as printed by
440 <command>systemd-analyze dump</command>.</para></listitem>
441 </varlistentry>
442
443 <varlistentry>
444 <term><constant>SIGHUP</constant></term>
445
446 <listitem><para>Reloads the complete daemon configuration.
447 This is mostly equivalent to <command>systemctl
448 daemon-reload</command>.</para></listitem>
449 </varlistentry>
450
451 <varlistentry>
452 <term><constant>SIGRTMIN+0</constant></term>
453
454 <listitem><para>Enters default mode, starts the
455 <filename>default.target</filename> unit. This is mostly
d60cb656 456 equivalent to <command>systemctl isolate
798d3a52
ZJS
457 default.target</command>.</para></listitem>
458 </varlistentry>
459
460 <varlistentry>
461 <term><constant>SIGRTMIN+1</constant></term>
462
463 <listitem><para>Enters rescue mode, starts the
464 <filename>rescue.target</filename> unit. This is mostly
465 equivalent to <command>systemctl isolate
466 rescue.target</command>.</para></listitem>
467 </varlistentry>
468
469 <varlistentry>
470 <term><constant>SIGRTMIN+2</constant></term>
471
472 <listitem><para>Enters emergency mode, starts the
473 <filename>emergency.service</filename> unit. This is mostly
474 equivalent to <command>systemctl isolate
475 emergency.service</command>.</para></listitem>
476 </varlistentry>
477
478 <varlistentry>
479 <term><constant>SIGRTMIN+3</constant></term>
480
481 <listitem><para>Halts the machine, starts the
482 <filename>halt.target</filename> unit. This is mostly
d60cb656 483 equivalent to <command>systemctl start halt.target
27e64442 484 --job-mode=replace-irreversibly</command>.</para>
d60cb656 485 </listitem>
798d3a52
ZJS
486 </varlistentry>
487
488 <varlistentry>
489 <term><constant>SIGRTMIN+4</constant></term>
490
491 <listitem><para>Powers off the machine, starts the
492 <filename>poweroff.target</filename> unit. This is mostly
d60cb656 493 equivalent to <command>systemctl start poweroff.target
27e64442 494 --job-mode=replace-irreversibly</command>.</para>
d60cb656 495 </listitem>
798d3a52
ZJS
496 </varlistentry>
497
498 <varlistentry>
499 <term><constant>SIGRTMIN+5</constant></term>
500
501 <listitem><para>Reboots the machine, starts the
502 <filename>reboot.target</filename> unit. This is mostly
d60cb656 503 equivalent to <command>systemctl start reboot.target
27e64442 504 --job-mode=replace-irreversibly</command>.</para>
d60cb656 505 </listitem>
798d3a52
ZJS
506 </varlistentry>
507
508 <varlistentry>
509 <term><constant>SIGRTMIN+6</constant></term>
510
511 <listitem><para>Reboots the machine via kexec, starts the
512 <filename>kexec.target</filename> unit. This is mostly
d60cb656 513 equivalent to <command>systemctl start kexec.target
27e64442 514 --job-mode=replace-irreversibly</command>.</para>
d60cb656 515 </listitem>
798d3a52
ZJS
516 </varlistentry>
517
518 <varlistentry>
519 <term><constant>SIGRTMIN+13</constant></term>
520
521 <listitem><para>Immediately halts the machine.</para></listitem>
522 </varlistentry>
523
524 <varlistentry>
525 <term><constant>SIGRTMIN+14</constant></term>
526
527 <listitem><para>Immediately powers off the machine.</para></listitem>
528 </varlistentry>
529
530 <varlistentry>
531 <term><constant>SIGRTMIN+15</constant></term>
532
533 <listitem><para>Immediately reboots the machine.</para></listitem>
534 </varlistentry>
535
536 <varlistentry>
537 <term><constant>SIGRTMIN+16</constant></term>
538
539 <listitem><para>Immediately reboots the machine with kexec.</para></listitem>
540 </varlistentry>
541
542 <varlistentry>
543 <term><constant>SIGRTMIN+20</constant></term>
544
545 <listitem><para>Enables display of status messages on the
546 console, as controlled via
547 <varname>systemd.show_status=1</varname> on the kernel command
548 line.</para></listitem>
549 </varlistentry>
550
551 <varlistentry>
552 <term><constant>SIGRTMIN+21</constant></term>
553
554 <listitem><para>Disables display of
555 status messages on the console, as
556 controlled via
557 <varname>systemd.show_status=0</varname>
558 on the kernel command
559 line.</para></listitem>
560 </varlistentry>
561
562 <varlistentry>
563 <term><constant>SIGRTMIN+22</constant></term>
a6ecbf83
FB
564
565 <listitem><para>Sets the service manager's log level to <literal>debug</literal>, in a fashion equivalent to
566 <varname>systemd.log_level=debug</varname> on the kernel command line.</para></listitem>
567 </varlistentry>
568
569 <varlistentry>
798d3a52
ZJS
570 <term><constant>SIGRTMIN+23</constant></term>
571
a6ecbf83
FB
572 <listitem><para>Restores the log level to its configured value. The configured value is derived from – in order
573 of priority – the value specified with <varname>systemd.log-level=</varname> on the kernel command line, or the
574 value specified with <option>LogLevel=</option> in the configuration file, or the built-in default of
575 <literal>info</literal>.</para></listitem>
798d3a52
ZJS
576 </varlistentry>
577
578 <varlistentry>
579 <term><constant>SIGRTMIN+24</constant></term>
580
581 <listitem><para>Immediately exits the manager (only available
582 for --user instances).</para></listitem>
583 </varlistentry>
584
585 <varlistentry>
586 <term><constant>SIGRTMIN+26</constant></term>
bda7d78b
FB
587
588 <listitem><para>Restores the log target to its configured value. The configured value is derived from – in
589 order of priority – the value specified with <varname>systemd.log-target=</varname> on the kernel command line,
590 or the value specified with <option>LogTarget=</option> in the configuration file, or the built-in
591 default.</para></listitem>
592 </varlistentry>
593
594 <varlistentry>
798d3a52
ZJS
595 <term><constant>SIGRTMIN+27</constant></term>
596 <term><constant>SIGRTMIN+28</constant></term>
597
bda7d78b
FB
598 <listitem><para>Sets the log target to <literal>console</literal> on <constant>SIGRTMIN+27</constant> (or
599 <literal>kmsg</literal> on <constant>SIGRTMIN+28</constant>), in a fashion equivalent to
600 <varname>systemd.log_target=console</varname> (or <varname>systemd.log_target=kmsg</varname> on
601 <constant>SIGRTMIN+28</constant>) on the kernel command line.</para></listitem>
798d3a52
ZJS
602 </varlistentry>
603 </variablelist>
604 </refsect1>
605
606 <refsect1>
607 <title>Environment</title>
608
609 <variablelist class='environment-variables'>
610 <varlistentry>
611 <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
612 <listitem><para>systemd reads the log level from this
613 environment variable. This can be overridden with
614 <option>--log-level=</option>.</para></listitem>
615 </varlistentry>
616
617 <varlistentry>
618 <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
619 <listitem><para>systemd reads the log target from this
620 environment variable. This can be overridden with
621 <option>--log-target=</option>.</para></listitem>
622 </varlistentry>
623
624 <varlistentry>
625 <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
626 <listitem><para>Controls whether systemd highlights important
627 log messages. This can be overridden with
628 <option>--log-color=</option>.</para></listitem>
629 </varlistentry>
630
631 <varlistentry>
632 <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
633 <listitem><para>Controls whether systemd prints the code
634 location along with log messages. This can be overridden with
635 <option>--log-location=</option>.</para></listitem>
636 </varlistentry>
637
638 <varlistentry>
639 <term><varname>$XDG_CONFIG_HOME</varname></term>
640 <term><varname>$XDG_CONFIG_DIRS</varname></term>
641 <term><varname>$XDG_DATA_HOME</varname></term>
642 <term><varname>$XDG_DATA_DIRS</varname></term>
643
644 <listitem><para>The systemd user manager uses these variables
645 in accordance to the <ulink
646 url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
647 Base Directory specification</ulink> to find its
648 configuration.</para></listitem>
649 </varlistentry>
650
651 <varlistentry>
652 <term><varname>$SYSTEMD_UNIT_PATH</varname></term>
653
654 <listitem><para>Controls where systemd looks for unit
655 files.</para></listitem>
656 </varlistentry>
657
658 <varlistentry>
659 <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
660
661 <listitem><para>Controls where systemd looks for SysV init
662 scripts.</para></listitem>
663 </varlistentry>
664
665 <varlistentry>
666 <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
667
668 <listitem><para>Controls where systemd looks for SysV init
669 script runlevel link farms.</para></listitem>
670 </varlistentry>
671
339bf207
ZJS
672 <xi:include href="less-variables.xml" xpointer="colors" />
673 <xi:include href="less-variables.xml" xpointer="urlify" />
23b27b39 674
798d3a52
ZJS
675 <varlistentry>
676 <term><varname>$LISTEN_PID</varname></term>
677 <term><varname>$LISTEN_FDS</varname></term>
8dd4c05b 678 <term><varname>$LISTEN_FDNAMES</varname></term>
798d3a52
ZJS
679
680 <listitem><para>Set by systemd for supervised processes during
681 socket-based activation. See
682 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
acf553b0 683 for more information.</para></listitem>
798d3a52
ZJS
684 </varlistentry>
685
686 <varlistentry>
687 <term><varname>$NOTIFY_SOCKET</varname></term>
688
689 <listitem><para>Set by systemd for supervised processes for
690 status and start-up completion notification. See
691 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
acf553b0 692 for more information.</para></listitem>
798d3a52
ZJS
693 </varlistentry>
694 </variablelist>
8ce202fa
LP
695
696 <para>For further environment variables understood by systemd and its various components, see <ulink
697 url="https://systemd.io/ENVIRONMENT">Known Environment Variables</ulink>.</para>
798d3a52
ZJS
698 </refsect1>
699
700 <refsect1>
701 <title>Kernel Command Line</title>
702
28f0aef4
ZJS
703 <para>When run as the system instance systemd parses a number of options listed below. They can be
704 specified as kernel command line arguments<footnote><para>If run inside a Linux container these arguments
705 may be passed as command line arguments to systemd itself, next to any of the command line options listed
706 in the Options section above. If run outside of Linux containers, these arguments are parsed from
707 <filename>/proc/cmdline</filename> instead.</para></footnote>, or through the
708 <literal>SystemdOptions</literal> EFI variable (on EFI systems). The kernel command line has higher
709 priority. Following variables are understood:</para>
798d3a52
ZJS
710
711 <variablelist class='kernel-commandline-options'>
712 <varlistentry>
713 <term><varname>systemd.unit=</varname></term>
714 <term><varname>rd.systemd.unit=</varname></term>
715
716 <listitem><para>Overrides the unit to activate on boot.
717 Defaults to <filename>default.target</filename>. This may be
718 used to temporarily boot into a different boot unit, for
719 example <filename>rescue.target</filename> or
720 <filename>emergency.service</filename>. See
721 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
722 for details about these units. The option prefixed with
723 <literal>rd.</literal> is honored only in the initial RAM disk
724 (initrd), while the one that is not prefixed only in the main
725 system.</para></listitem>
726 </varlistentry>
727
728 <varlistentry>
770c4777 729 <term><varname>systemd.dump_core</varname></term>
798d3a52 730
770c4777
ZJS
731 <listitem><para>Takes a boolean argument or enables the option if specified
732 without an argument. If enabled, the systemd manager (PID 1) dumps core when
733 it crashes. Otherwise, no core dump is created. Defaults to enabled.</para>
734 </listitem>
b9e74c39
LP
735 </varlistentry>
736
737 <varlistentry>
770c4777 738 <term><varname>systemd.crash_chvt</varname></term>
b9e74c39 739
770c4777
ZJS
740 <listitem><para>Takes a positive integer, or a boolean argument. Can be also
741 specified without an argument, with the same effect as a positive boolean. If
742 a positive integer (in the range 1–63) is specified, the system manager (PID
743 1) will activate the specified virtual terminal (VT) when it
744 crashes. Defaults to disabled, meaning that no such switch is attempted. If
745 set to enabled, the VT the kernel messages are written to is selected.
746 </para></listitem>
798d3a52
ZJS
747 </varlistentry>
748
749 <varlistentry>
770c4777 750 <term><varname>systemd.crash_shell</varname></term>
798d3a52 751
770c4777
ZJS
752 <listitem><para>Takes a boolean argument or enables the option if specified
753 without an argument. If enabled, the system manager (PID 1) spawns a shell
754 when it crashes, after a 10s delay. Otherwise, no shell is spawned. Defaults
755 to disabled, for security reasons, as the shell is not protected by password
798d3a52
ZJS
756 authentication.</para></listitem>
757 </varlistentry>
758
759 <varlistentry>
770c4777 760 <term><varname>systemd.crash_reboot</varname></term>
798d3a52 761
770c4777
ZJS
762 <listitem><para>Takes a boolean argument or enables the option if specified
763 without an argument. If enabled, the system manager (PID 1) will reboot the
764 machine automatically when it crashes, after a 10s delay. Otherwise, the
765 system will hang indefinitely. Defaults to disabled, in order to avoid a
766 reboot loop. If combined with <varname>systemd.crash_shell</varname>, the
4cf0b03b 767 system is rebooted after the shell exits.</para></listitem>
798d3a52
ZJS
768 </varlistentry>
769
770 <varlistentry>
770c4777 771 <term><varname>systemd.confirm_spawn</varname></term>
798d3a52 772
770c4777
ZJS
773 <listitem><para>Takes a boolean argument or a path to the virtual console
774 where the confirmation messages should be emitted. Can be also specified
775 without an argument, with the same effect as a positive boolean. If enabled,
776 the system manager (PID 1) asks for confirmation when spawning processes
777 using <option>/dev/console</option>. If a path or a console name (such as
778 <literal>ttyS0</literal>) is provided, the virtual console pointed to by this
779 path or described by the give name will be used instead. Defaults to disabled.
780 </para></listitem>
798d3a52
ZJS
781 </varlistentry>
782
2a12e32e
JK
783 <varlistentry>
784 <term><varname>systemd.service_watchdogs=</varname></term>
785
786 <listitem><para>Takes a boolean argument. If disabled, all service runtime
787 watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g.
788 <option>OnFailure=</option> or <option>StartLimitAction=</option>) are
789 ignored by the system manager (PID 1); see
790 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
791 Defaults to enabled, i.e. watchdogs and failure actions are processed
792 normally. The hardware watchdog is not affected by this
793 option.</para></listitem>
794 </varlistentry>
795
798d3a52 796 <varlistentry>
770c4777 797 <term><varname>systemd.show_status</varname></term>
798d3a52 798
770c4777
ZJS
799 <listitem><para>Takes a boolean argument or the constant
800 <constant>auto</constant>. Can be also specified without an argument, with
801 the same effect as a positive boolean. If enabled, the systemd manager (PID
802 1) shows terse service status updates on the console during bootup.
803 <constant>auto</constant> behaves like <option>false</option> until a unit
804 fails or there is a significant delay in boot. Defaults to enabled, unless
805 <option>quiet</option> is passed as kernel command line option, in which case
806 it defaults to <constant>auto</constant>. If specified overrides the system
807 manager configuration file option <option>ShowStatus=</option>, see
808 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
c035f376 809 </para></listitem>
798d3a52
ZJS
810 </varlistentry>
811
36cf4507
ZJS
812 <varlistentry>
813 <term><varname>systemd.status_unit_format=</varname></term>
814
815 <listitem><para>Takes either <option>name</option> or <option>description</option> as the value. If
816 <option>name</option>, the system manager will use unit names in status messages. If specified,
817 overrides the system manager configuration file option <option>StatusUnitFormat=</option>, see
818 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
819 </para></listitem>
820 </varlistentry>
821
798d3a52
ZJS
822 <varlistentry>
823 <term><varname>systemd.log_target=</varname></term>
824 <term><varname>systemd.log_level=</varname></term>
798d3a52 825 <term><varname>systemd.log_location=</varname></term>
770c4777 826 <term><varname>systemd.log_color</varname></term>
798d3a52 827
770c4777
ZJS
828 <listitem><para>Controls log output, with the same effect as the
829 <varname>$SYSTEMD_LOG_TARGET</varname>,
798d3a52 830 <varname>$SYSTEMD_LOG_LEVEL</varname>,
770c4777
ZJS
831 <varname>$SYSTEMD_LOG_LOCATION</varname>,
832 <varname>$SYSTEMD_LOG_COLOR</varname> environment variables described above.
833 <varname>systemd.log_color</varname> can be specified without an argument,
834 with the same effect as a positive boolean.</para></listitem>
798d3a52
ZJS
835 </varlistentry>
836
837 <varlistentry>
838 <term><varname>systemd.default_standard_output=</varname></term>
839 <term><varname>systemd.default_standard_error=</varname></term>
c035f376
ZJS
840
841 <listitem><para>Controls default standard output and error output for services and sockets. That is,
842 controls the default for <option>StandardOutput=</option> and <option>StandardError=</option> (see
843 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
844 details). Takes one of <option>inherit</option>, <option>null</option>, <option>tty</option>,
845 <option>journal</option>, <option>journal+console</option>, <option>kmsg</option>,
846 <option>kmsg+console</option>. If the argument is omitted
847 <varname>systemd.default-standard-output=</varname> defaults to <option>journal</option> and
848 <varname>systemd.default-standard-error=</varname> to <option>inherit</option>.</para></listitem>
798d3a52
ZJS
849 </varlistentry>
850
851 <varlistentry>
852 <term><varname>systemd.setenv=</varname></term>
853
854 <listitem><para>Takes a string argument in the form
855 VARIABLE=VALUE. May be used to set default environment
856 variables to add to forked child processes. May be used more
857 than once to set multiple variables.</para></listitem>
858 </varlistentry>
859
ee48dbd5
NC
860 <varlistentry>
861 <term><varname>systemd.machine_id=</varname></term>
862
863 <listitem><para>Takes a 32 character hex value to be
864 used for setting the machine-id. Intended mostly for
865 network booting where the same machine-id is desired
866 for every boot.</para></listitem>
867 </varlistentry>
868
ee075513
ZJS
869 <varlistentry>
870 <term><varname>systemd.unified_cgroup_hierarchy</varname></term>
871
872 <listitem><para>When specified without an argument or with a true argument,
873 enables the usage of
874 <ulink url="https://www.kernel.org/doc/Documentation/cgroup-v2.txt">unified cgroup hierarchy</ulink>
875 (a.k.a. cgroups-v2). When specified with a false argument, fall back to
876 hybrid or full legacy cgroup hierarchy.</para>
877
878 <para>If this option is not specified, the default behaviour is determined
0fad72fa 879 during compilation (the <option>-Ddefault-hierarchy=</option> meson
ee075513
ZJS
880 option). If the kernel does not support unified cgroup hierarchy, the legacy
881 hierarchy will be used even if this option is specified.</para>
882 </listitem>
883 </varlistentry>
884
885 <varlistentry>
886 <term><varname>systemd.legacy_systemd_cgroup_controller</varname></term>
887
888 <listitem><para>Takes effect if the full unified cgroup hierarchy is not used
889 (see previous option). When specified without an argument or with a true
890 argument, disables the use of "hybrid" cgroup hierarchy (i.e. a cgroups-v2
891 tree used for systemd, and
892 <ulink url="https://www.kernel.org/doc/Documentation/cgroup-v1/">legacy
893 cgroup hierarchy</ulink>, a.k.a. cgroups-v1, for other controllers), and
894 forces a full "legacy" mode. When specified with a false argument, enables
895 the use of "hybrid" hierarchy.</para>
896
897 <para>If this option is not specified, the default behaviour is determined
0fad72fa 898 during compilation (the <option>-Ddefault-hierarchy=</option> meson
ee075513
ZJS
899 option). If the kernel does not support unified cgroup hierarchy, the legacy
900 hierarchy will be used even if this option is specified.</para>
901 </listitem>
902 </varlistentry>
903
798d3a52
ZJS
904 <varlistentry>
905 <term><varname>quiet</varname></term>
906
907 <listitem><para>Turn off status output at boot, much like
964c4eda 908 <varname>systemd.show_status=no</varname> would. Note that
798d3a52
ZJS
909 this option is also read by the kernel itself and disables
910 kernel log output. Passing this option hence turns off the
911 usual output from both the system manager and the kernel.
912 </para></listitem>
913 </varlistentry>
914
915 <varlistentry>
916 <term><varname>debug</varname></term>
917
918 <listitem><para>Turn on debugging output. This is equivalent
919 to <varname>systemd.log_level=debug</varname>. Note that this
920 option is also read by the kernel itself and enables kernel
921 debug output. Passing this option hence turns on the debug
922 output from both the system manager and the
923 kernel.</para></listitem>
924 </varlistentry>
925
926 <varlistentry>
927 <term><varname>emergency</varname></term>
dcd61450 928 <term><varname>rd.emergency</varname></term>
798d3a52
ZJS
929 <term><varname>-b</varname></term>
930
931 <listitem><para>Boot into emergency mode. This is equivalent
dcd61450
IS
932 to <varname>systemd.unit=emergency.target</varname> or
933 <varname>rd.systemd.unit=emergency.target</varname>, respectively, and
934 provided for compatibility reasons and to be easier to type.</para></listitem>
798d3a52
ZJS
935 </varlistentry>
936
937 <varlistentry>
938 <term><varname>rescue</varname></term>
dcd61450 939 <term><varname>rd.rescue</varname></term>
798d3a52
ZJS
940 <term><varname>single</varname></term>
941 <term><varname>s</varname></term>
942 <term><varname>S</varname></term>
943 <term><varname>1</varname></term>
944
945 <listitem><para>Boot into rescue mode. This is equivalent to
dcd61450
IS
946 <varname>systemd.unit=rescue.target</varname> or
947 <varname>rd.systemd.unit=rescue.target</varname>, respectively, and
948 provided for compatibility reasons and to be easier to type.</para></listitem>
798d3a52
ZJS
949 </varlistentry>
950
951 <varlistentry>
952 <term><varname>2</varname></term>
953 <term><varname>3</varname></term>
954 <term><varname>4</varname></term>
955 <term><varname>5</varname></term>
956
957 <listitem><para>Boot into the specified legacy SysV runlevel.
958 These are equivalent to
959 <varname>systemd.unit=runlevel2.target</varname>,
960 <varname>systemd.unit=runlevel3.target</varname>,
961 <varname>systemd.unit=runlevel4.target</varname>, and
962 <varname>systemd.unit=runlevel5.target</varname>,
963 respectively, and provided for compatibility reasons and to be
964 easier to type.</para></listitem>
965 </varlistentry>
966
967 <varlistentry>
968 <term><varname>locale.LANG=</varname></term>
969 <term><varname>locale.LANGUAGE=</varname></term>
970 <term><varname>locale.LC_CTYPE=</varname></term>
971 <term><varname>locale.LC_NUMERIC=</varname></term>
972 <term><varname>locale.LC_TIME=</varname></term>
973 <term><varname>locale.LC_COLLATE=</varname></term>
974 <term><varname>locale.LC_MONETARY=</varname></term>
975 <term><varname>locale.LC_MESSAGES=</varname></term>
976 <term><varname>locale.LC_PAPER=</varname></term>
977 <term><varname>locale.LC_NAME=</varname></term>
978 <term><varname>locale.LC_ADDRESS=</varname></term>
979 <term><varname>locale.LC_TELEPHONE=</varname></term>
980 <term><varname>locale.LC_MEASUREMENT=</varname></term>
981 <term><varname>locale.LC_IDENTIFICATION=</varname></term>
982
983 <listitem><para>Set the system locale to use. This overrides
984 the settings in <filename>/etc/locale.conf</filename>. For
b938cb90 985 more information, see
3ba3a79d 986 <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
798d3a52 987 and
3ba3a79d 988 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
798d3a52
ZJS
989 </para></listitem>
990 </varlistentry>
991 </variablelist>
992
993 <para>For other kernel command line parameters understood by
994 components of the core OS, please refer to
995 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
996 </refsect1>
c035f376
ZJS
997
998 <refsect1>
999 <title>Options</title>
1000
1001 <para><command>systemd</command> is only very rarely invoked directly, since it is started early and is
1002 already running by the time users may interact with it. Normally, tools like
1003 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> are used to
1004 give commands to the manager. Since <command>systemd</command> is usually not invoked directly, the
1005 options listed below are mostly useful for debugging and special purposes.</para>
1006
1007 <refsect2>
1008 <title>Introspection and debugging options</title>
1009
1010 <para>Those options are used for testing and introspection, and <command>systemd</command> may
1011 be invoked with them at any time:</para>
1012
1013 <variablelist>
1014 <varlistentry>
1015 <term><option>--dump-configuration-items</option></term>
1016
1017 <listitem><para>Dump understood unit configuration items. This outputs a terse but complete list of
1018 configuration items understood in unit definition files.</para></listitem>
1019 </varlistentry>
1020
1021 <varlistentry>
1022 <term><option>--dump-bus-properties</option></term>
1023
1024 <listitem><para>Dump exposed bus properties. This outputs a terse but complete list of properties
1025 exposed on D-Bus.</para></listitem>
1026 </varlistentry>
1027
1028 <varlistentry>
1029 <term><option>--test</option></term>
1030
1031 <listitem><para>Determine the initial start-up transaction (i.e. the list of jobs enqueued at
1032 start-up), dump it and exit — without actually executing any of the determined jobs. This option is
1033 useful for debugging only. Note that during regular service manager start-up additional units not
1034 shown by this operation may be started, because hardware, socket, bus or other kinds of activation
1035 might add additional jobs as the transaction is executed. Use <option>--system</option> to request
1036 the initial transaction of the system service manager (this is also the implied default), combine
1037 with <option>--user</option> to request the initial transaction of the per-user service manager
1038 instead.</para></listitem>
1039 </varlistentry>
1040
1041 <varlistentry>
1042 <term><option>--system</option></term>
1043 <term><option>--user</option></term>
1044
1045 <listitem><para>When used in conjunction with <option>--test</option>, selects whether to calculate
1046 the initial transaction for the system instance or for a per-user instance. These options have no
1047 effect when invoked without <option>--test</option>, as during regular
1048 (i.e. non-<option>--test</option>) invocations the service manager will automatically detect
1049 whether it shall operate in system or per-user mode, by checking whether the PID it is run as is 1
1050 or not. Note that it is not supported booting and maintaining a system with the service manager
1051 running in <option>--system</option> mode but with a PID other than 1.</para></listitem>
1052 </varlistentry>
1053
1054 <xi:include href="standard-options.xml" xpointer="help" />
1055 <xi:include href="standard-options.xml" xpointer="version" />
1056 </variablelist>
1057 </refsect2>
1058
1059 <refsect2>
1060 <title>Options that duplicate kernel command line settings</title>
1061
1062 <para>Those options correspond directly to options listed above in "Kernel Command Line". Both forms
1063 may be used equivalently for the system manager, but it is recommended to use the forms listed above in
1064 this context, because they are properly namespaced. When an option is specified both on the kernel
1065 command line, and as a normal command line argument, the latter has higher precedence.</para>
1066
1067 <para>When <command>systemd</command> is used a user manager, the kernel command line is ignored and
1068 the options described are understood. Nevertheless, <command>systemd</command> is usually started in
1069 this mode through the
1070 <citerefentry><refentrytitle>user@.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1071 service, which is shared between all users, and it may be more convenient to use configuration files to
1072 modify settings, see
1073 <citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1074 or a drop-in that specifies one of the environment variables listed above in "Environment, see
1075 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1076
1077 <variablelist>
1078 <varlistentry>
1079 <term><option>--unit=</option></term>
1080
1081 <listitem><para>Set default unit to activate on startup. If not specified, defaults to
1082 <filename>default.target</filename>. See <varname>systemd.unit=</varname> above.</para></listitem>
1083 </varlistentry>
1084
1085 <varlistentry>
1086 <term><option>--dump-core</option></term>
1087
1088 <listitem><para>Enable core dumping on crash. This switch has no effect when running as user
1089 instance. Same as <varname>systemd.dump_core=</varname> above.</para></listitem>
1090 </varlistentry>
1091
1092 <varlistentry>
1093 <term><option>--crash-vt=</option><replaceable>VT</replaceable></term>
1094
1095 <listitem><para>Switch to a specific virtual console (VT) on crash. This switch has no effect when
1096 running as user instance. Same as <varname>systemd.crash_chvt=</varname> above (but not the
1097 different spelling!).</para></listitem>
1098 </varlistentry>
1099
1100 <varlistentry>
1101 <term><option>--crash-shell</option></term>
1102
1103 <listitem><para>Run a shell on crash. This switch has no effect when running as user instance. See
1104 <varname>systemd.crash_shell=</varname> above.</para></listitem>
1105 </varlistentry>
1106
1107 <varlistentry>
1108 <term><option>--crash-reboot</option></term>
1109
1110 <listitem><para>Automatically reboot the system on crash. This switch has no effect when running as
1111 user instance. See <varname>systemd.crash_reboot</varname> above.</para></listitem>
1112 </varlistentry>
1113
1114 <varlistentry>
1115 <term><option>--confirm-spawn</option></term>
1116
1117 <listitem><para>Ask for confirmation when spawning processes. This switch has no effect when run as
1118 user instance. See <varname>systemd.confirm_spawn</varname> above.</para></listitem>
1119 </varlistentry>
1120
1121 <varlistentry>
1122 <term><option>--show-status</option></term>
1123
1124 <listitem><para>Show terse unit status information is shown on the console during boot-up and
1125 shutdown. See <varname>systemd.show_status</varname> above.</para></listitem>
1126 </varlistentry>
1127
1128 <varlistentry>
1129 <term><option>--log-target=</option></term>
1130
1131 <listitem><para>Set log target. See <varname>systemd.log_target</varname> above.</para></listitem>
1132 </varlistentry>
1133
1134 <varlistentry>
1135 <term><option>--log-level=</option></term>
1136
1137 <listitem><para>Set log level. See <varname>systemd.log_level</varname> above.</para></listitem>
1138 </varlistentry>
1139
1140 <varlistentry>
1141 <term><option>--log-color</option></term>
1142
1143 <listitem><para>Highlight important log messages. See <varname>systemd.log_color</varname> above.
1144 </para></listitem>
1145 </varlistentry>
1146
1147 <varlistentry>
1148 <term><option>--log-location</option></term>
1149
1150 <listitem><para>Include code location in log messages. See <varname>systemd.log_location</varname>
1151 above.</para></listitem>
1152 </varlistentry>
1153
1154 <varlistentry>
1155 <term><option>--machine-id=</option></term>
1156
1157 <listitem><para>Override the machine-id set on the hard drive. See
1158 <varname>systemd.machine_id=</varname> above.</para></listitem>
1159 </varlistentry>
1160
1161 <varlistentry>
1162 <term><option>--service-watchdogs</option></term>
1163
1164 <listitem><para>Globally enable/disable all service watchdog timeouts and emergency actions. See
1165 <varname>systemd.service_watchdogs</varname> above.</para></listitem>
1166 </varlistentry>
1167
1168 <varlistentry>
1169 <term><option>--default-standard-output=</option></term>
1170 <term><option>--default-standard-error=</option></term>
1171
1172 <listitem><para>Sets the default output or error output for all services and sockets,
1173 respectively. See <varname>systemd.default_standard_output=</varname> and
1174 <varname>systemd.default_standard_error=</varname> above.</para></listitem>
1175 </varlistentry>
1176 </variablelist>
1177 </refsect2>
1178 </refsect1>
798d3a52
ZJS
1179
1180 <refsect1>
1181 <title>Sockets and FIFOs</title>
1182
1183 <variablelist>
1184 <varlistentry>
1185 <term><filename>/run/systemd/notify</filename></term>
1186
1187 <listitem><para>Daemon status notification socket. This is an
1188 <constant>AF_UNIX</constant> datagram socket and is used to
1189 implement the daemon notification logic as implemented by
1190 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
1191
1192 </varlistentry>
1193
798d3a52
ZJS
1194 <varlistentry>
1195 <term><filename>/run/systemd/private</filename></term>
1196
1197 <listitem><para>Used internally as communication channel
1198 between
1199 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1200 and the systemd process. This is an
1201 <constant>AF_UNIX</constant> stream socket. This interface is
1202 private to systemd and should not be used in external
1203 projects.</para></listitem>
1204 </varlistentry>
1205
1206 <varlistentry>
1207 <term><filename>/dev/initctl</filename></term>
1208
1209 <listitem><para>Limited compatibility support for the SysV
1210 client interface, as implemented by the
1211 <filename>systemd-initctl.service</filename> unit. This is a
1212 named pipe in the file system. This interface is obsolete and
1213 should not be used in new applications.</para></listitem>
1214 </varlistentry>
1215 </variablelist>
1216 </refsect1>
1217
1218 <refsect1>
1219 <title>See Also</title>
1220 <para>
28a0ad81 1221 The <ulink url="https://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
798d3a52 1222 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3ba3a79d 1223 <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a52
ZJS
1224 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1225 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1226 <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1227 <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1228 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1229 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1230 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1231 <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1232 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1233 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1234 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1235 </para>
1236 </refsect1>
9e632bf7
LP
1237
1238</refentry>