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