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