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