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