| 1 |
<?xml version='1.0'?> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="systemd" |
| 7 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 8 |
|
| 9 |
<refentryinfo> |
| 10 |
<title>systemd</title> |
| 11 |
<productname>systemd</productname> |
| 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> |
| 27 |
<command>/usr/lib/systemd/systemd</command> |
| 28 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 29 |
</cmdsynopsis> |
| 30 |
<cmdsynopsis> |
| 31 |
<command>init</command> |
| 32 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 33 |
</cmdsynopsis> |
| 34 |
</refsynopsisdiv> |
| 35 |
|
| 36 |
<refsect1> |
| 37 |
<title>Description</title> |
| 38 |
|
| 39 |
<para>systemd is a system and service manager for Linux operating systems. When run as first process on |
| 40 |
boot (as PID 1), it acts as init system that brings up and maintains userspace services. Separate |
| 41 |
instances are started for logged-in users to start their services.</para> |
| 42 |
|
| 43 |
<para><command>systemd</command> is usually not invoked directly by the user, but is installed as the |
| 44 |
<filename>/sbin/init</filename> symlink and started during early boot. The user manager instances are |
| 45 |
started automatically through the |
| 46 |
<citerefentry><refentrytitle>[email protected]</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 47 |
service.</para> |
| 48 |
|
| 49 |
<para>When run as a system instance, systemd interprets the |
| 50 |
configuration file <filename>system.conf</filename> and the files |
| 51 |
in <filename>system.conf.d</filename> directories; when run as a |
| 52 |
user instance, systemd interprets the configuration file |
| 53 |
<filename>user.conf</filename> and the files in |
| 54 |
<filename>user.conf.d</filename> directories. See |
| 55 |
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 56 |
for more information.</para> |
| 57 |
|
| 58 |
<para><command>systemd</command> contains native implementations of various tasks that need to be |
| 59 |
executed as part of the boot process. For example, it sets the hostname or configures the loopback |
| 60 |
network device. It also sets up and mounts various API file systems, such as <filename>/sys/</filename>, |
| 61 |
<filename>/proc/</filename>, and <filename>/dev/</filename>.</para> |
| 62 |
|
| 63 |
<para><command>systemd</command> will also reset the system clock during early boot if it appears to be |
| 64 |
set incorrectly. See "System clock epoch" section below.</para> |
| 65 |
|
| 66 |
<para>Note that some but not all interfaces provided by systemd are covered by the |
| 67 |
<ulink url="https://systemd.io/PORTABILITY_AND_STABILITY/">Interface Portability and Stability Promise</ulink>.</para> |
| 68 |
|
| 69 |
<para>The D-Bus API of <command>systemd</command> is described in |
| 70 |
<citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 71 |
and |
| 72 |
<citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 73 |
</para> |
| 74 |
|
| 75 |
<para>Systems which invoke systemd in a container or initrd environment should implement the <ulink |
| 76 |
url="https://systemd.io/CONTAINER_INTERFACE">Container Interface</ulink> or |
| 77 |
<ulink url="https://systemd.io/INITRD_INTERFACE/">initrd Interface</ulink> |
| 78 |
specifications, respectively.</para> |
| 79 |
</refsect1> |
| 80 |
|
| 81 |
<refsect1> |
| 82 |
<title>Units</title> |
| 83 |
|
| 84 |
<para>systemd provides a dependency system between various entities called "units" of 11 different |
| 85 |
types. Units encapsulate various objects that are relevant for system boot-up and maintenance. The |
| 86 |
majority of units are configured in unit configuration files, whose syntax and basic set of options is |
| 87 |
described in |
| 88 |
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
| 89 |
however some are created automatically from other configuration files, dynamically from system state or |
| 90 |
programmatically at runtime. Units may be in a number of states, described in the following table. Note |
| 91 |
that the various unit types may have a number of additional substates, which are mapped to the |
| 92 |
generalized unit states described here.</para> |
| 93 |
|
| 94 |
<xi:include href="unit-states.xml" xpointer="table"/> |
| 95 |
|
| 96 |
<para>The following unit types are available:</para> |
| 97 |
|
| 98 |
<orderedlist> |
| 99 |
<listitem><para>Service units, which start and control daemons |
| 100 |
and the processes they consist of. For details, see |
| 101 |
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 102 |
|
| 103 |
<listitem><para>Socket units, which encapsulate local IPC or |
| 104 |
network sockets in the system, useful for socket-based |
| 105 |
activation. For details about socket units, see |
| 106 |
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
| 107 |
for details on socket-based activation and other forms of |
| 108 |
activation, see |
| 109 |
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem> |
| 110 |
|
| 111 |
<listitem><para>Target units are useful to group units, or |
| 112 |
provide well-known synchronization points during boot-up, see |
| 113 |
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 114 |
|
| 115 |
<listitem><para>Device units expose kernel devices in systemd |
| 116 |
and may be used to implement device-based activation. For |
| 117 |
details, see |
| 118 |
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 119 |
|
| 120 |
<listitem><para>Mount units control mount points in the file |
| 121 |
system, for details see |
| 122 |
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 123 |
|
| 124 |
<listitem><para>Automount units provide automount capabilities, |
| 125 |
for on-demand mounting of file systems as well as parallelized |
| 126 |
boot-up. See |
| 127 |
<citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 128 |
|
| 129 |
<listitem><para>Timer units are useful for triggering activation |
| 130 |
of other units based on timers. You may find details in |
| 131 |
<citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 132 |
|
| 133 |
<listitem><para>Swap units are very similar to mount units and |
| 134 |
encapsulate memory swap partitions or files of the operating |
| 135 |
system. They are described in |
| 136 |
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 137 |
|
| 138 |
<listitem><para>Path units may be used to activate other |
| 139 |
services when file system objects change or are modified. See |
| 140 |
<citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 141 |
|
| 142 |
<listitem><para>Slice units may be used to group units which |
| 143 |
manage system processes (such as service and scope units) in a |
| 144 |
hierarchical tree for resource management purposes. See |
| 145 |
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 146 |
|
| 147 |
<listitem><para>Scope units are similar to service units, but |
| 148 |
manage foreign processes instead of starting them as well. See |
| 149 |
<citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> |
| 150 |
|
| 151 |
</orderedlist> |
| 152 |
|
| 153 |
<para>Units are named as their configuration files. Some units |
| 154 |
have special semantics. A detailed list is available in |
| 155 |
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 156 |
|
| 157 |
<para>systemd knows various kinds of dependencies, including |
| 158 |
positive and negative requirement dependencies (i.e. |
| 159 |
<varname>Requires=</varname> and <varname>Conflicts=</varname>) as |
| 160 |
well as ordering dependencies (<varname>After=</varname> and |
| 161 |
<varname>Before=</varname>). NB: ordering and requirement |
| 162 |
dependencies are orthogonal. If only a requirement dependency |
| 163 |
exists between two units (e.g. <filename>foo.service</filename> |
| 164 |
requires <filename>bar.service</filename>), but no ordering |
| 165 |
dependency (e.g. <filename>foo.service</filename> after |
| 166 |
<filename>bar.service</filename>) and both are requested to start, |
| 167 |
they will be started in parallel. It is a common pattern that both |
| 168 |
requirement and ordering dependencies are placed between two |
| 169 |
units. Also note that the majority of dependencies are implicitly |
| 170 |
created and maintained by systemd. In most cases, it should be |
| 171 |
unnecessary to declare additional dependencies manually, however |
| 172 |
it is possible to do this.</para> |
| 173 |
|
| 174 |
<para>Application programs and units (via dependencies) may |
| 175 |
request state changes of units. In systemd, these requests are |
| 176 |
encapsulated as 'jobs' and maintained in a job queue. Jobs may |
| 177 |
succeed or can fail, their execution is ordered based on the |
| 178 |
ordering dependencies of the units they have been scheduled |
| 179 |
for.</para> |
| 180 |
|
| 181 |
<para>On boot systemd activates the target unit |
| 182 |
<filename>default.target</filename> whose job is to activate |
| 183 |
on-boot services and other on-boot units by pulling them in via |
| 184 |
dependencies. Usually, the unit name is just an alias (symlink) for |
| 185 |
either <filename>graphical.target</filename> (for fully-featured |
| 186 |
boots into the UI) or <filename>multi-user.target</filename> (for |
| 187 |
limited console-only boots for use in embedded or server |
| 188 |
environments, or similar; a subset of graphical.target). However, |
| 189 |
it is at the discretion of the administrator to configure it as an |
| 190 |
alias to any other target unit. See |
| 191 |
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
| 192 |
for details about these target units.</para> |
| 193 |
|
| 194 |
<para>On first boot, <command>systemd</command> will enable or disable units according to preset policy. |
| 195 |
See <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 196 |
and "First Boot Semantics" in |
| 197 |
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> |
| 198 |
|
| 199 |
<para>systemd only keeps a minimal set of units loaded into memory. Specifically, the only units that are |
| 200 |
kept loaded into memory are those for which at least one of the following conditions is true:</para> |
| 201 |
|
| 202 |
<orderedlist> |
| 203 |
<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> |
| 204 |
<listitem><para>It has a job queued for it</para></listitem> |
| 205 |
<listitem><para>It is a dependency of at least one other unit that is loaded into memory</para></listitem> |
| 206 |
<listitem><para>It has some form of resource still allocated (e.g. a service unit that is inactive but for which |
| 207 |
a process is still lingering that ignored the request to be terminated)</para></listitem> |
| 208 |
<listitem><para>It has been pinned into memory programmatically by a D-Bus call</para></listitem> |
| 209 |
</orderedlist> |
| 210 |
|
| 211 |
<para>systemd will automatically and implicitly load units from disk — if they are not loaded yet — as soon as |
| 212 |
operations are requested for them. Thus, in many respects, the fact whether a unit is loaded or not is invisible to |
| 213 |
clients. Use <command>systemctl list-units --all</command> to comprehensively list all units currently loaded. Any |
| 214 |
unit for which none of the conditions above applies is promptly unloaded. Note that when a unit is unloaded from |
| 215 |
memory its accounting data is flushed out too. However, this data is generally not lost, as a journal log record |
| 216 |
is generated declaring the consumed resources whenever a unit shuts down.</para> |
| 217 |
|
| 218 |
<para>Processes systemd spawns are placed in individual Linux control groups named after the unit which |
| 219 |
they belong to in the private systemd hierarchy. (see <ulink |
| 220 |
url="https://docs.kernel.org/admin-guide/cgroup-v2.html">Control Groups v2</ulink> for more information |
| 221 |
about control groups, or short "cgroups"). systemd uses this to effectively keep track of |
| 222 |
processes. Control group information is maintained in the kernel, and is accessible via the file system |
| 223 |
hierarchy (beneath <filename>/sys/fs/cgroup/</filename>), or in tools such as <citerefentry |
| 224 |
project='man-pages'><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry> or |
| 225 |
<citerefentry |
| 226 |
project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry> (<command>ps |
| 227 |
xawf -eo pid,user,cgroup,args</command> is particularly useful to list all processes and the systemd |
| 228 |
units they belong to.).</para> |
| 229 |
|
| 230 |
<para>systemd is compatible with various established Unix functionality such as |
| 231 |
<filename>/etc/fstab</filename> or the <filename>utmp</filename> database.</para> |
| 232 |
|
| 233 |
<para>systemd has a minimal transaction system: if a unit is |
| 234 |
requested to start up or shut down it will add it and all its |
| 235 |
dependencies to a temporary transaction. Then, it will verify if |
| 236 |
the transaction is consistent (i.e. whether the ordering of all |
| 237 |
units is cycle-free). If it is not, systemd will try to fix it up, |
| 238 |
and removes non-essential jobs from the transaction that might |
| 239 |
remove the loop. Also, systemd tries to suppress non-essential |
| 240 |
jobs in the transaction that would stop a running service. Finally |
| 241 |
it is checked whether the jobs of the transaction contradict jobs |
| 242 |
that have already been queued, and optionally the transaction is |
| 243 |
aborted then. If all worked out and the transaction is consistent |
| 244 |
and minimized in its impact it is merged with all already |
| 245 |
outstanding jobs and added to the run queue. Effectively this |
| 246 |
means that before executing a requested operation, systemd will |
| 247 |
verify that it makes sense, fixing it if possible, and only |
| 248 |
failing if it really cannot work.</para> |
| 249 |
|
| 250 |
<para>Note that transactions are generated independently of a unit's |
| 251 |
state at runtime, hence, for example, if a start job is requested on an |
| 252 |
already started unit, it will still generate a transaction and wake up any |
| 253 |
inactive dependencies (and cause propagation of other jobs as per the |
| 254 |
defined relationships). This is because the enqueued job is at the time of |
| 255 |
execution compared to the target unit's state and is marked successful and |
| 256 |
complete when both satisfy. However, this job also pulls in other |
| 257 |
dependencies due to the defined relationships and thus leads to, in our |
| 258 |
example, start jobs for any of those inactive units getting queued as |
| 259 |
well.</para> |
| 260 |
|
| 261 |
<para>Units may be generated dynamically at boot and system |
| 262 |
manager reload time, for example based on other configuration |
| 263 |
files or parameters passed on the kernel command line. For details, see |
| 264 |
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 265 |
</refsect1> |
| 266 |
|
| 267 |
<refsect1> |
| 268 |
<title>Directories</title> |
| 269 |
|
| 270 |
<variablelist> |
| 271 |
<varlistentry> |
| 272 |
<term>System unit directories</term> |
| 273 |
|
| 274 |
<listitem><para>The systemd system manager reads unit |
| 275 |
configuration from various directories. Packages that want to |
| 276 |
install unit files shall place them in the directory returned |
| 277 |
by <command>pkg-config systemd |
| 278 |
--variable=systemdsystemunitdir</command>. Other directories |
| 279 |
checked are <filename>/usr/local/lib/systemd/system</filename> |
| 280 |
and <filename>/usr/lib/systemd/system</filename>. User |
| 281 |
configuration always takes precedence. <command>pkg-config |
| 282 |
systemd --variable=systemdsystemconfdir</command> returns the |
| 283 |
path of the system configuration directory. Packages should |
| 284 |
alter the content of these directories only with the |
| 285 |
<command>enable</command> and <command>disable</command> |
| 286 |
commands of the |
| 287 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 288 |
tool. Full list of directories is provided in |
| 289 |
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 290 |
</para></listitem> |
| 291 |
</varlistentry> |
| 292 |
</variablelist> |
| 293 |
|
| 294 |
<variablelist> |
| 295 |
<varlistentry> |
| 296 |
<term>User unit directories</term> |
| 297 |
|
| 298 |
<listitem><para>Similar rules apply for the user unit |
| 299 |
directories. However, here the |
| 300 |
<ulink url="https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG |
| 301 |
Base Directory specification</ulink> is followed to find |
| 302 |
units. Applications should place their unit files in the |
| 303 |
directory returned by <command>pkg-config systemd |
| 304 |
--variable=systemduserunitdir</command>. Global configuration |
| 305 |
is done in the directory reported by <command>pkg-config |
| 306 |
systemd --variable=systemduserconfdir</command>. The |
| 307 |
<command>enable</command> and <command>disable</command> |
| 308 |
commands of the |
| 309 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 310 |
tool can handle both global (i.e. for all users) and private |
| 311 |
(for one user) enabling/disabling of units. Full list of |
| 312 |
directories is provided in |
| 313 |
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 314 |
</para></listitem> |
| 315 |
</varlistentry> |
| 316 |
</variablelist> |
| 317 |
</refsect1> |
| 318 |
|
| 319 |
<refsect1> |
| 320 |
<title>Signals</title> |
| 321 |
|
| 322 |
<para>The service listens to various UNIX process signals that can be used to request various actions |
| 323 |
asynchronously. The signal handling is enabled very early during boot, before any further processes are |
| 324 |
invoked. However, a supervising container manager or similar that intends to request these operations via |
| 325 |
this mechanism must take into consideration that this functionality is not available during the earliest |
| 326 |
initialization phase. An <function>sd_notify()</function> notification message carrying the |
| 327 |
<varname>X_SYSTEMD_SIGNALS_LEVEL=2</varname> field is emitted once the signal handlers are enabled, see |
| 328 |
below. This may be used to schedule submission of these signals correctly.</para> |
| 329 |
|
| 330 |
<variablelist> |
| 331 |
<varlistentry> |
| 332 |
<term><constant>SIGTERM</constant></term> |
| 333 |
|
| 334 |
<listitem><para>Upon receiving this signal the systemd system |
| 335 |
manager serializes its state, reexecutes itself and |
| 336 |
deserializes the saved state again. This is mostly equivalent |
| 337 |
to <command>systemctl daemon-reexec</command>.</para> |
| 338 |
|
| 339 |
<para>systemd user managers will start the |
| 340 |
<filename>exit.target</filename> unit when this signal is |
| 341 |
received. This is mostly equivalent to <command>systemctl |
| 342 |
--user start exit.target |
| 343 |
--job-mode=replace-irreversibly</command>.</para></listitem> |
| 344 |
</varlistentry> |
| 345 |
|
| 346 |
<varlistentry> |
| 347 |
<term><constant>SIGINT</constant></term> |
| 348 |
|
| 349 |
<listitem><para>Upon receiving this signal the systemd system manager will start the |
| 350 |
<filename>ctrl-alt-del.target</filename> unit. This is mostly equivalent to |
| 351 |
<command>systemctl start ctrl-alt-del.target --job-mode=replace-irreversibly</command>. If |
| 352 |
this signal is received more than 7 times per 2s, an immediate reboot is triggered. Note |
| 353 |
that pressing |
| 354 |
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> on the |
| 355 |
console will trigger this signal. Hence, if a reboot is hanging, pressing |
| 356 |
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> more than |
| 357 |
7 times in 2 seconds is a relatively safe way to trigger an immediate reboot.</para> |
| 358 |
|
| 359 |
<para>systemd user managers treat this signal the same way as |
| 360 |
<constant>SIGTERM</constant>.</para></listitem> |
| 361 |
</varlistentry> |
| 362 |
|
| 363 |
<varlistentry> |
| 364 |
<term><constant>SIGWINCH</constant></term> |
| 365 |
|
| 366 |
<listitem><para>When this signal is received the systemd |
| 367 |
system manager will start the |
| 368 |
<filename>kbrequest.target</filename> unit. This is mostly |
| 369 |
equivalent to <command>systemctl start |
| 370 |
kbrequest.target</command>.</para> |
| 371 |
|
| 372 |
<para>This signal is ignored by systemd user |
| 373 |
managers.</para></listitem> |
| 374 |
</varlistentry> |
| 375 |
|
| 376 |
<varlistentry> |
| 377 |
<term><constant>SIGPWR</constant></term> |
| 378 |
|
| 379 |
<listitem><para>When this signal is received the systemd |
| 380 |
manager will start the <filename>sigpwr.target</filename> |
| 381 |
unit. This is mostly equivalent to <command>systemctl start |
| 382 |
sigpwr.target</command>.</para></listitem> |
| 383 |
</varlistentry> |
| 384 |
|
| 385 |
<varlistentry> |
| 386 |
<term><constant>SIGUSR1</constant></term> |
| 387 |
|
| 388 |
<listitem><para>When this signal is received the systemd |
| 389 |
manager will try to reconnect to the D-Bus |
| 390 |
bus.</para></listitem> |
| 391 |
</varlistentry> |
| 392 |
|
| 393 |
<varlistentry> |
| 394 |
<term><constant>SIGUSR2</constant></term> |
| 395 |
|
| 396 |
<listitem><para>When this signal is received the systemd |
| 397 |
manager will log its complete state in human-readable form. |
| 398 |
The data logged is the same as printed by |
| 399 |
<command>systemd-analyze dump</command>.</para></listitem> |
| 400 |
</varlistentry> |
| 401 |
|
| 402 |
<varlistentry> |
| 403 |
<term><constant>SIGHUP</constant></term> |
| 404 |
|
| 405 |
<listitem><para>Reloads the complete daemon configuration. |
| 406 |
This is mostly equivalent to <command>systemctl |
| 407 |
daemon-reload</command>.</para></listitem> |
| 408 |
</varlistentry> |
| 409 |
|
| 410 |
<varlistentry> |
| 411 |
<term><constant>SIGRTMIN+0</constant></term> |
| 412 |
|
| 413 |
<listitem><para>Enters default mode, starts the |
| 414 |
<filename>default.target</filename> unit. This is mostly |
| 415 |
equivalent to <command>systemctl isolate |
| 416 |
default.target</command>.</para></listitem> |
| 417 |
</varlistentry> |
| 418 |
|
| 419 |
<varlistentry> |
| 420 |
<term><constant>SIGRTMIN+1</constant></term> |
| 421 |
|
| 422 |
<listitem><para>Enters rescue mode, starts the |
| 423 |
<filename>rescue.target</filename> unit. This is mostly |
| 424 |
equivalent to <command>systemctl isolate |
| 425 |
rescue.target</command>.</para></listitem> |
| 426 |
</varlistentry> |
| 427 |
|
| 428 |
<varlistentry> |
| 429 |
<term><constant>SIGRTMIN+2</constant></term> |
| 430 |
|
| 431 |
<listitem><para>Enters emergency mode, starts the |
| 432 |
<filename>emergency.service</filename> unit. This is mostly |
| 433 |
equivalent to <command>systemctl isolate |
| 434 |
emergency.service</command>.</para></listitem> |
| 435 |
</varlistentry> |
| 436 |
|
| 437 |
<varlistentry> |
| 438 |
<term><constant>SIGRTMIN+3</constant></term> |
| 439 |
|
| 440 |
<listitem><para>Halts the machine, starts the |
| 441 |
<filename>halt.target</filename> unit. This is mostly |
| 442 |
equivalent to <command>systemctl start halt.target |
| 443 |
--job-mode=replace-irreversibly</command>.</para> |
| 444 |
</listitem> |
| 445 |
</varlistentry> |
| 446 |
|
| 447 |
<varlistentry> |
| 448 |
<term><constant>SIGRTMIN+4</constant></term> |
| 449 |
|
| 450 |
<listitem><para>Powers off the machine, starts the |
| 451 |
<filename>poweroff.target</filename> unit. This is mostly |
| 452 |
equivalent to <command>systemctl start poweroff.target |
| 453 |
--job-mode=replace-irreversibly</command>.</para> |
| 454 |
</listitem> |
| 455 |
</varlistentry> |
| 456 |
|
| 457 |
<varlistentry> |
| 458 |
<term><constant>SIGRTMIN+5</constant></term> |
| 459 |
|
| 460 |
<listitem><para>Reboots the machine, starts the |
| 461 |
<filename>reboot.target</filename> unit. This is mostly |
| 462 |
equivalent to <command>systemctl start reboot.target |
| 463 |
--job-mode=replace-irreversibly</command>.</para> |
| 464 |
</listitem> |
| 465 |
</varlistentry> |
| 466 |
|
| 467 |
<varlistentry> |
| 468 |
<term><constant>SIGRTMIN+6</constant></term> |
| 469 |
|
| 470 |
<listitem><para>Reboots the machine via kexec, starts the |
| 471 |
<filename>kexec.target</filename> unit. This is mostly |
| 472 |
equivalent to <command>systemctl start kexec.target |
| 473 |
--job-mode=replace-irreversibly</command>.</para> |
| 474 |
</listitem> |
| 475 |
</varlistentry> |
| 476 |
|
| 477 |
<varlistentry> |
| 478 |
<term><constant>SIGRTMIN+7</constant></term> |
| 479 |
|
| 480 |
<listitem><para>Reboots userspace, starts the <filename>soft-reboot.target</filename> unit. This is |
| 481 |
mostly equivalent to <command>systemctl start soft-reboot.target |
| 482 |
--job-mode=replace-irreversibly</command>.</para> |
| 483 |
|
| 484 |
<xi:include href="version-info.xml" xpointer="v254"/> |
| 485 |
</listitem> |
| 486 |
</varlistentry> |
| 487 |
|
| 488 |
<varlistentry> |
| 489 |
<term><constant>SIGRTMIN+13</constant></term> |
| 490 |
|
| 491 |
<listitem><para>Immediately halts the machine.</para></listitem> |
| 492 |
</varlistentry> |
| 493 |
|
| 494 |
<varlistentry> |
| 495 |
<term><constant>SIGRTMIN+14</constant></term> |
| 496 |
|
| 497 |
<listitem><para>Immediately powers off the machine.</para></listitem> |
| 498 |
</varlistentry> |
| 499 |
|
| 500 |
<varlistentry> |
| 501 |
<term><constant>SIGRTMIN+15</constant></term> |
| 502 |
|
| 503 |
<listitem><para>Immediately reboots the machine.</para></listitem> |
| 504 |
</varlistentry> |
| 505 |
|
| 506 |
<varlistentry> |
| 507 |
<term><constant>SIGRTMIN+16</constant></term> |
| 508 |
|
| 509 |
<listitem><para>Immediately reboots the machine with kexec.</para></listitem> |
| 510 |
</varlistentry> |
| 511 |
|
| 512 |
<varlistentry> |
| 513 |
<term><constant>SIGRTMIN+17</constant></term> |
| 514 |
|
| 515 |
<listitem><para>Immediately reboots the userspace.</para> |
| 516 |
|
| 517 |
<xi:include href="version-info.xml" xpointer="v254"/></listitem> |
| 518 |
</varlistentry> |
| 519 |
|
| 520 |
<varlistentry> |
| 521 |
<term><constant>SIGRTMIN+20</constant></term> |
| 522 |
|
| 523 |
<listitem><para>Enables display of status messages on the |
| 524 |
console, as controlled via |
| 525 |
<varname>systemd.show_status=1</varname> on the kernel command |
| 526 |
line.</para> |
| 527 |
<para>You may want to use <function>SetShowStatus()</function> instead of |
| 528 |
<constant>SIGRTMIN+20</constant> in order to prevent race conditions. See |
| 529 |
<citerefentry project="man-pages"><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 530 |
</para></listitem> |
| 531 |
</varlistentry> |
| 532 |
|
| 533 |
<varlistentry> |
| 534 |
<term><constant>SIGRTMIN+21</constant></term> |
| 535 |
|
| 536 |
<listitem><para>Disables display of |
| 537 |
status messages on the console, as |
| 538 |
controlled via |
| 539 |
<varname>systemd.show_status=0</varname> |
| 540 |
on the kernel command |
| 541 |
line.</para> |
| 542 |
<para>You may want to use <function>SetShowStatus()</function> instead of |
| 543 |
<constant>SIGRTMIN+21</constant> in order to prevent race conditions. See |
| 544 |
<citerefentry project="man-pages"><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 545 |
</para></listitem> |
| 546 |
</varlistentry> |
| 547 |
|
| 548 |
<varlistentry> |
| 549 |
<term><constant>SIGRTMIN+22</constant></term> |
| 550 |
|
| 551 |
<listitem><para>Sets the service manager's log level to <literal>debug</literal>, in a fashion equivalent to |
| 552 |
<varname>systemd.log_level=debug</varname> on the kernel command line.</para></listitem> |
| 553 |
</varlistentry> |
| 554 |
|
| 555 |
<varlistentry> |
| 556 |
<term><constant>SIGRTMIN+23</constant></term> |
| 557 |
|
| 558 |
<listitem><para>Restores the log level to its configured value. The configured value is derived from – in order |
| 559 |
of priority – the value specified with <varname>systemd.log-level=</varname> on the kernel command line, or the |
| 560 |
value specified with <option>LogLevel=</option> in the configuration file, or the built-in default of |
| 561 |
<literal>info</literal>.</para> |
| 562 |
|
| 563 |
<xi:include href="version-info.xml" xpointer="v239"/></listitem> |
| 564 |
</varlistentry> |
| 565 |
|
| 566 |
<varlistentry> |
| 567 |
<term><constant>SIGRTMIN+24</constant></term> |
| 568 |
|
| 569 |
<listitem><para>Immediately exits the manager (only available |
| 570 |
for --user instances).</para> |
| 571 |
|
| 572 |
<xi:include href="version-info.xml" xpointer="v195"/></listitem> |
| 573 |
</varlistentry> |
| 574 |
|
| 575 |
<varlistentry> |
| 576 |
<term><constant>SIGRTMIN+25</constant></term> |
| 577 |
|
| 578 |
<listitem><para>Upon receiving this signal the systemd manager will reexecute itself. This |
| 579 |
is mostly equivalent to <command>systemctl daemon-reexec</command> except that it will be |
| 580 |
done asynchronously.</para> |
| 581 |
|
| 582 |
<para>The systemd system manager treats this signal the same way as |
| 583 |
<constant>SIGTERM</constant>.</para> |
| 584 |
|
| 585 |
<xi:include href="version-info.xml" xpointer="v250"/></listitem> |
| 586 |
</varlistentry> |
| 587 |
|
| 588 |
<varlistentry> |
| 589 |
<term><constant>SIGRTMIN+26</constant></term> |
| 590 |
|
| 591 |
<listitem><para>Restores the log target to its configured value. The configured value is derived from – in |
| 592 |
order of priority – the value specified with <varname>systemd.log-target=</varname> on the kernel command line, |
| 593 |
or the value specified with <option>LogTarget=</option> in the configuration file, or the built-in |
| 594 |
default.</para> |
| 595 |
|
| 596 |
<xi:include href="version-info.xml" xpointer="v239"/></listitem> |
| 597 |
</varlistentry> |
| 598 |
|
| 599 |
<varlistentry> |
| 600 |
<term><constant>SIGRTMIN+27</constant></term> |
| 601 |
<term><constant>SIGRTMIN+28</constant></term> |
| 602 |
|
| 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> |
| 607 |
|
| 608 |
<xi:include href="version-info.xml" xpointer="v239"/></listitem> |
| 609 |
</varlistentry> |
| 610 |
</variablelist> |
| 611 |
</refsect1> |
| 612 |
|
| 613 |
<refsect1> |
| 614 |
<title>Environment</title> |
| 615 |
|
| 616 |
<para>The environment block for the system manager is initially set by the kernel. (In particular, |
| 617 |
<literal>key=value</literal> assignments on the kernel command line are turned into environment |
| 618 |
variables for PID 1). For the user manager, the system manager sets the environment as described in the |
| 619 |
"Environment Variables in Spawned Processes" section of |
| 620 |
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The |
| 621 |
<varname>DefaultEnvironment=</varname> setting in the system manager applies to all services including |
| 622 |
<filename>[email protected]</filename>. Additional entries may be configured (as for any other service) |
| 623 |
through the <varname>Environment=</varname> and <varname>EnvironmentFile=</varname> settings for |
| 624 |
<filename>[email protected]</filename> (see |
| 625 |
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>). Also, |
| 626 |
additional environment variables may be set through the <varname>ManagerEnvironment=</varname> setting in |
| 627 |
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 628 |
and |
| 629 |
<citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 630 |
</para> |
| 631 |
|
| 632 |
<para>Some of the variables understood by <command>systemd</command>:</para> |
| 633 |
|
| 634 |
<variablelist class='environment-variables'> |
| 635 |
<varlistentry> |
| 636 |
<term><varname>$SYSTEMD_LOG_LEVEL</varname></term> |
| 637 |
<listitem><xi:include href="common-variables.xml" xpointer="log-level-body" /> |
| 638 |
|
| 639 |
<para>This can be overridden with <option>--log-level=</option>.</para></listitem> |
| 640 |
</varlistentry> |
| 641 |
|
| 642 |
<varlistentry> |
| 643 |
<term><varname>$SYSTEMD_LOG_COLOR</varname></term> |
| 644 |
<listitem><xi:include href="common-variables.xml" xpointer="log-color-body" /> |
| 645 |
|
| 646 |
<para>This can be overridden with <option>--log-color=</option>.</para></listitem> |
| 647 |
</varlistentry> |
| 648 |
|
| 649 |
<varlistentry> |
| 650 |
<term><varname>$SYSTEMD_LOG_TIME</varname></term> |
| 651 |
<listitem><xi:include href="common-variables.xml" xpointer="log-time-body" /> |
| 652 |
|
| 653 |
<para>This can be overridden with <option>--log-time=</option>.</para> |
| 654 |
|
| 655 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 656 |
</varlistentry> |
| 657 |
|
| 658 |
<varlistentry> |
| 659 |
<term><varname>$SYSTEMD_LOG_LOCATION</varname></term> |
| 660 |
<listitem><xi:include href="common-variables.xml" xpointer="log-location-body" /> |
| 661 |
|
| 662 |
<para>This can be overridden with <option>--log-location=</option>.</para></listitem> |
| 663 |
</varlistentry> |
| 664 |
|
| 665 |
<varlistentry> |
| 666 |
<term><varname>$SYSTEMD_LOG_TID</varname></term> |
| 667 |
<listitem><xi:include href="common-variables.xml" xpointer="log-tid-body" /> |
| 668 |
|
| 669 |
<xi:include href="version-info.xml" xpointer="v247"/></listitem> |
| 670 |
</varlistentry> |
| 671 |
|
| 672 |
<varlistentry> |
| 673 |
<term><varname>$SYSTEMD_LOG_TARGET</varname></term> |
| 674 |
<listitem><xi:include href="common-variables.xml" xpointer="log-target-body" /> |
| 675 |
|
| 676 |
<para>This can be overridden with <option>--log-target=</option>.</para></listitem> |
| 677 |
</varlistentry> |
| 678 |
|
| 679 |
<varlistentry> |
| 680 |
<term><varname>$SYSTEMD_LOG_RATELIMIT_KMSG</varname></term> |
| 681 |
<listitem><xi:include href="common-variables.xml" xpointer="log-ratelimit-kmsg-body" /> |
| 682 |
|
| 683 |
<xi:include href="version-info.xml" xpointer="v254"/></listitem> |
| 684 |
</varlistentry> |
| 685 |
|
| 686 |
<varlistentry> |
| 687 |
<term><varname>$XDG_CONFIG_HOME</varname></term> |
| 688 |
<term><varname>$XDG_CONFIG_DIRS</varname></term> |
| 689 |
<term><varname>$XDG_DATA_HOME</varname></term> |
| 690 |
<term><varname>$XDG_DATA_DIRS</varname></term> |
| 691 |
|
| 692 |
<listitem><para>The systemd user manager uses these variables |
| 693 |
in accordance to the <ulink |
| 694 |
url="https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG |
| 695 |
Base Directory specification</ulink> to find its |
| 696 |
configuration.</para></listitem> |
| 697 |
</varlistentry> |
| 698 |
|
| 699 |
<varlistentry> |
| 700 |
<term><varname>$SYSTEMD_UNIT_PATH</varname></term> |
| 701 |
<term><varname>$SYSTEMD_GENERATOR_PATH</varname></term> |
| 702 |
<term><varname>$SYSTEMD_ENVIRONMENT_GENERATOR_PATH</varname></term> |
| 703 |
|
| 704 |
<listitem><para>Controls where systemd looks for unit files and |
| 705 |
generators.</para> |
| 706 |
<para>These variables may contain a list of paths, separated by colons |
| 707 |
(<literal>:</literal>). When set, if the list ends with an empty |
| 708 |
component (<literal>...:</literal>), this list is prepended to the |
| 709 |
usual set of paths. Otherwise, the specified list replaces the usual |
| 710 |
set of paths. |
| 711 |
</para></listitem> |
| 712 |
</varlistentry> |
| 713 |
|
| 714 |
<xi:include href="common-variables.xml" xpointer="pager"/> |
| 715 |
<xi:include href="common-variables.xml" xpointer="less"/> |
| 716 |
<xi:include href="common-variables.xml" xpointer="lesscharset"/> |
| 717 |
<xi:include href="common-variables.xml" xpointer="lesssecure"/> |
| 718 |
<xi:include href="common-variables.xml" xpointer="colors"/> |
| 719 |
<xi:include href="common-variables.xml" xpointer="urlify"/> |
| 720 |
|
| 721 |
<varlistentry> |
| 722 |
<term><varname>$LISTEN_PID</varname></term> |
| 723 |
<term><varname>$LISTEN_PIDFDID</varname></term> |
| 724 |
<term><varname>$LISTEN_FDS</varname></term> |
| 725 |
<term><varname>$LISTEN_FDNAMES</varname></term> |
| 726 |
|
| 727 |
<listitem><para>Set by systemd for supervised processes during |
| 728 |
socket-based activation. See |
| 729 |
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> |
| 730 |
for more information.</para></listitem> |
| 731 |
</varlistentry> |
| 732 |
|
| 733 |
<varlistentry> |
| 734 |
<term><varname>$NOTIFY_SOCKET</varname></term> |
| 735 |
|
| 736 |
<listitem><para>Set by service manager for its services for status and readiness notifications. Also |
| 737 |
consumed by service manager for notifying supervising container managers or service managers up the |
| 738 |
stack about its own progress. See |
| 739 |
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> and the |
| 740 |
relevant section below for more information.</para></listitem> |
| 741 |
</varlistentry> |
| 742 |
</variablelist> |
| 743 |
|
| 744 |
<para>For further environment variables understood by systemd and its various components, see <ulink |
| 745 |
url="https://systemd.io/ENVIRONMENT">Known Environment Variables</ulink>.</para> |
| 746 |
</refsect1> |
| 747 |
|
| 748 |
<refsect1> |
| 749 |
<title>Kernel Command Line</title> |
| 750 |
|
| 751 |
<para>When run as the system instance, systemd parses a number of options listed below. They can be |
| 752 |
specified as kernel command line arguments which are parsed from a number of sources depending on the |
| 753 |
environment in which systemd is executed. If run inside a Linux container, these options are parsed from |
| 754 |
the command line arguments passed to systemd itself, next to any of the command line options listed in |
| 755 |
the Options section above. If run outside of Linux containers, these arguments are parsed from |
| 756 |
<filename>/proc/cmdline</filename> instead.</para> |
| 757 |
|
| 758 |
<para>The following variables are understood:</para> |
| 759 |
|
| 760 |
<variablelist class='kernel-commandline-options'> |
| 761 |
<varlistentry> |
| 762 |
<term><varname>systemd.unit=</varname></term> |
| 763 |
<term><varname>rd.systemd.unit=</varname></term> |
| 764 |
|
| 765 |
<listitem><para>Overrides the unit to activate on boot. Defaults to |
| 766 |
<filename>default.target</filename>. This may be used to temporarily boot into a different boot unit, |
| 767 |
for example <filename>rescue.target</filename> or <filename>emergency.service</filename>. See |
| 768 |
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
| 769 |
for details about these units. The option prefixed with <literal>rd.</literal> is honored only in the |
| 770 |
initrd, while the one that is not prefixed only in the main system.</para></listitem> |
| 771 |
</varlistentry> |
| 772 |
|
| 773 |
<varlistentry> |
| 774 |
<term><varname>systemd.dump_core</varname></term> |
| 775 |
|
| 776 |
<listitem><para>Takes a boolean argument or enables the option if specified |
| 777 |
without an argument. If enabled, the systemd manager (PID 1) dumps core when |
| 778 |
it crashes. Otherwise, no core dump is created. Defaults to enabled.</para> |
| 779 |
|
| 780 |
<xi:include href="version-info.xml" xpointer="v233"/> |
| 781 |
</listitem> |
| 782 |
</varlistentry> |
| 783 |
|
| 784 |
<varlistentry> |
| 785 |
<term><varname>systemd.crash_chvt</varname></term> |
| 786 |
|
| 787 |
<listitem><para>Takes a positive integer, or a boolean argument. Can be also specified without an |
| 788 |
argument, with the same effect as a positive boolean. If a positive integer (in the range 1–63) is |
| 789 |
specified, the system manager (PID 1) will activate the specified virtual terminal when it crashes. |
| 790 |
Defaults to disabled, meaning that no such switch is attempted. If set to enabled, the virtual |
| 791 |
terminal the kernel messages are written to is used instead.</para> |
| 792 |
|
| 793 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 794 |
</varlistentry> |
| 795 |
|
| 796 |
<varlistentry> |
| 797 |
<term><varname>systemd.crash_shell</varname></term> |
| 798 |
|
| 799 |
<listitem><para>Takes a boolean argument or enables the option if specified |
| 800 |
without an argument. If enabled, the system manager (PID 1) spawns a shell |
| 801 |
when it crashes. Otherwise, no shell is spawned. Defaults to disabled, for |
| 802 |
security reasons, as the shell is not protected by password authentication.</para> |
| 803 |
|
| 804 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 805 |
</varlistentry> |
| 806 |
|
| 807 |
<varlistentry> |
| 808 |
<term><varname>systemd.crash_action=</varname></term> |
| 809 |
|
| 810 |
<listitem><para>Takes one of <literal>freeze</literal>, <literal>reboot</literal> or |
| 811 |
<literal>poweroff</literal>. Defaults to <literal>freeze</literal>. If set to |
| 812 |
<literal>freeze</literal>, the system will hang indefinitely when the system manager (PID 1) crashes. |
| 813 |
If set to <literal>reboot</literal>, the system manager (PID 1) will reboot the machine automatically |
| 814 |
when it crashes, after a 10s delay. If set to <literal>poweroff</literal>, the system manager (PID 1) |
| 815 |
will power off the machine immediately when it crashes. If combined with |
| 816 |
<varname>systemd.crash_shell</varname>, the configured crash action is executed after the shell |
| 817 |
exits.</para> |
| 818 |
|
| 819 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 820 |
</varlistentry> |
| 821 |
|
| 822 |
<varlistentry> |
| 823 |
<term><varname>systemd.confirm_spawn</varname></term> |
| 824 |
|
| 825 |
<listitem><para>Takes a boolean argument or a path to the virtual console |
| 826 |
where the confirmation messages should be emitted. Can be also specified |
| 827 |
without an argument, with the same effect as a positive boolean. If enabled, |
| 828 |
the system manager (PID 1) asks for confirmation when spawning processes |
| 829 |
using <option>/dev/console</option>. If a path or a console name (such as |
| 830 |
<literal>ttyS0</literal>) is provided, the virtual console pointed to by this |
| 831 |
path or described by the give name will be used instead. Defaults to disabled. |
| 832 |
</para> |
| 833 |
|
| 834 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 835 |
</varlistentry> |
| 836 |
|
| 837 |
<varlistentry> |
| 838 |
<term><varname>systemd.service_watchdogs=</varname></term> |
| 839 |
|
| 840 |
<listitem><para>Takes a boolean argument. If disabled, all service runtime |
| 841 |
watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g. |
| 842 |
<option>OnFailure=</option> or <option>StartLimitAction=</option>) are |
| 843 |
ignored by the system manager (PID 1); see |
| 844 |
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 845 |
Defaults to enabled, i.e. watchdogs and failure actions are processed |
| 846 |
normally. The hardware watchdog is not affected by this |
| 847 |
option.</para> |
| 848 |
|
| 849 |
<xi:include href="version-info.xml" xpointer="v237"/></listitem> |
| 850 |
</varlistentry> |
| 851 |
|
| 852 |
<varlistentry> |
| 853 |
<term><varname>systemd.show_status</varname></term> |
| 854 |
|
| 855 |
<listitem><para>Takes a boolean argument or the constants <constant>error</constant> and |
| 856 |
<constant>auto</constant>. Can be also specified without an argument, with the same effect as a |
| 857 |
positive boolean. If enabled, the systemd manager (PID 1) shows terse service status updates on the |
| 858 |
console during bootup. With <constant>error</constant>, only messages about failures are shown, but |
| 859 |
boot is otherwise quiet. <constant>auto</constant> behaves like <option>false</option> until there is |
| 860 |
a significant delay in boot. Defaults to enabled, unless <option>quiet</option> is passed as kernel |
| 861 |
command line option, in which case it defaults to <constant>error</constant>. If specified overrides |
| 862 |
the system manager configuration file option <option>ShowStatus=</option>, see |
| 863 |
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 864 |
</para> |
| 865 |
|
| 866 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 867 |
</varlistentry> |
| 868 |
|
| 869 |
<varlistentry> |
| 870 |
<term><varname>systemd.status_unit_format=</varname></term> |
| 871 |
|
| 872 |
<listitem><para>Takes <option>name</option>, <option>description</option> or |
| 873 |
<option>combined</option> as the value. If <option>name</option>, the system manager will use unit |
| 874 |
names in status messages. If <option>combined</option>, the system manager will use unit names and |
| 875 |
description in status messages. When specified, overrides the system manager configuration file |
| 876 |
option <option>StatusUnitFormat=</option>, see |
| 877 |
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 878 |
</para> |
| 879 |
|
| 880 |
<xi:include href="version-info.xml" xpointer="v243"/></listitem> |
| 881 |
</varlistentry> |
| 882 |
|
| 883 |
<varlistentry> |
| 884 |
<term><varname>systemd.log_color</varname></term> |
| 885 |
<term><varname>systemd.log_level=</varname></term> |
| 886 |
<term><varname>systemd.log_location</varname></term> |
| 887 |
<term><varname>systemd.log_target=</varname></term> |
| 888 |
<term><varname>systemd.log_time</varname></term> |
| 889 |
<term><varname>systemd.log_tid</varname></term> |
| 890 |
<term><varname>systemd.log_ratelimit_kmsg</varname></term> |
| 891 |
|
| 892 |
<listitem><para>Controls log output, with the same effect as the |
| 893 |
<varname>$SYSTEMD_LOG_COLOR</varname>, <varname>$SYSTEMD_LOG_LEVEL</varname>, |
| 894 |
<varname>$SYSTEMD_LOG_LOCATION</varname>, <varname>$SYSTEMD_LOG_TARGET</varname>, |
| 895 |
<varname>$SYSTEMD_LOG_TIME</varname>, <varname>$SYSTEMD_LOG_TID</varname> and |
| 896 |
<varname>$SYSTEMD_LOG_RATELIMIT_KMSG</varname> environment variables described above. |
| 897 |
<varname>systemd.log_color</varname>, <varname>systemd.log_location</varname>, |
| 898 |
<varname>systemd.log_time</varname>, <varname>systemd.log_tid</varname> and |
| 899 |
<varname>systemd.log_ratelimit_kmsg</varname> can be specified without |
| 900 |
an argument, with the same effect as a positive boolean.</para></listitem> |
| 901 |
</varlistentry> |
| 902 |
|
| 903 |
<varlistentry> |
| 904 |
<term><varname>systemd.default_standard_output=</varname></term> |
| 905 |
<term><varname>systemd.default_standard_error=</varname></term> |
| 906 |
|
| 907 |
<listitem><para>Controls default standard output and error output for services and sockets. That is, |
| 908 |
controls the default for <option>StandardOutput=</option> and <option>StandardError=</option> (see |
| 909 |
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 910 |
details). Takes one of <option>inherit</option>, <option>null</option>, <option>tty</option>, |
| 911 |
<option>journal</option>, <option>journal+console</option>, <option>kmsg</option>, |
| 912 |
<option>kmsg+console</option>. If the argument is omitted |
| 913 |
<varname>systemd.default-standard-output=</varname> defaults to <option>journal</option> and |
| 914 |
<varname>systemd.default-standard-error=</varname> to <option>inherit</option>.</para></listitem> |
| 915 |
</varlistentry> |
| 916 |
|
| 917 |
<varlistentry> |
| 918 |
<term><varname>systemd.setenv=</varname></term> |
| 919 |
|
| 920 |
<listitem><para>Takes a string argument in the form |
| 921 |
VARIABLE=VALUE. May be used to set default environment |
| 922 |
variables to add to forked child processes. May be used more |
| 923 |
than once to set multiple variables.</para></listitem> |
| 924 |
</varlistentry> |
| 925 |
|
| 926 |
<varlistentry> |
| 927 |
<term><varname>systemd.machine_id=</varname></term> |
| 928 |
|
| 929 |
<listitem><para>Takes a 32 character hex value to be |
| 930 |
used for setting the machine-id. Intended mostly for |
| 931 |
network booting where the same machine-id is desired |
| 932 |
for every boot.</para> |
| 933 |
|
| 934 |
<xi:include href="version-info.xml" xpointer="v229"/></listitem> |
| 935 |
</varlistentry> |
| 936 |
|
| 937 |
<varlistentry> |
| 938 |
<term><varname>systemd.set_credential=</varname></term> |
| 939 |
<term><varname>systemd.set_credential_binary=</varname></term> |
| 940 |
|
| 941 |
<listitem><para>Sets a system credential, which can then be propagated to system services using the |
| 942 |
<varname>ImportCredential=</varname> or <varname>LoadCredential=</varname> setting, see |
| 943 |
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 944 |
details. Takes a pair of credential name and value, separated by a colon. The |
| 945 |
<varname>systemd.set_credential=</varname> parameter expects the credential value in literal text |
| 946 |
form, the <varname>systemd.set_credential_binary=</varname> parameter takes binary data encoded in |
| 947 |
Base64. Note that the kernel command line is typically accessible by unprivileged programs in |
| 948 |
<filename>/proc/cmdline</filename>. Thus, this mechanism is not suitable for transferring sensitive |
| 949 |
data. Use it only for data that is not sensitive (e.g. public keys/certificates, rather than private |
| 950 |
keys), or in testing/debugging environments.</para> |
| 951 |
|
| 952 |
<para>For further information see <ulink url="https://systemd.io/CREDENTIALS">System and Service |
| 953 |
Credentials</ulink> documentation.</para> |
| 954 |
|
| 955 |
<xi:include href="version-info.xml" xpointer="v251"/></listitem> |
| 956 |
</varlistentry> |
| 957 |
|
| 958 |
<varlistentry> |
| 959 |
<term><varname>systemd.import_credentials=</varname></term> |
| 960 |
|
| 961 |
<listitem><para>Takes a boolean argument. If false disables importing credentials from the kernel |
| 962 |
command line, the DMI/SMBIOS OEM string table, the qemu_fw_cfg subsystem or the EFI kernel |
| 963 |
stub.</para> |
| 964 |
|
| 965 |
<xi:include href="version-info.xml" xpointer="v251"/></listitem> |
| 966 |
</varlistentry> |
| 967 |
|
| 968 |
<varlistentry> |
| 969 |
<term><varname>quiet</varname></term> |
| 970 |
|
| 971 |
<listitem><para>Turn off status output at boot, much like |
| 972 |
<varname>systemd.show_status=no</varname> would. Note that |
| 973 |
this option is also read by the kernel itself and disables |
| 974 |
kernel log output. Passing this option hence turns off the |
| 975 |
usual output from both the system manager and the kernel. |
| 976 |
</para> |
| 977 |
|
| 978 |
<xi:include href="version-info.xml" xpointer="v186"/></listitem> |
| 979 |
</varlistentry> |
| 980 |
|
| 981 |
<varlistentry> |
| 982 |
<term><varname>debug</varname></term> |
| 983 |
|
| 984 |
<listitem><para>Turn on debugging output. This is equivalent |
| 985 |
to <varname>systemd.log_level=debug</varname>. Note that this |
| 986 |
option is also read by the kernel itself and enables kernel |
| 987 |
debug output. Passing this option hence turns on the debug |
| 988 |
output from both the system manager and the |
| 989 |
kernel.</para> |
| 990 |
|
| 991 |
<xi:include href="version-info.xml" xpointer="v205"/></listitem> |
| 992 |
</varlistentry> |
| 993 |
|
| 994 |
<varlistentry> |
| 995 |
<term><varname>emergency</varname></term> |
| 996 |
<term><varname>rd.emergency</varname></term> |
| 997 |
|
| 998 |
<listitem><para>Boot into emergency mode. Those options are equivalent to |
| 999 |
<varname>systemd.unit=emergency.target</varname> or |
| 1000 |
<varname>rd.systemd.unit=emergency.target</varname>, respectively. They were initially |
| 1001 |
provided for compatibility with SysV, but are retained as convenient shortcuts.</para> |
| 1002 |
|
| 1003 |
<xi:include href="version-info.xml" xpointer="v186"/></listitem> |
| 1004 |
</varlistentry> |
| 1005 |
|
| 1006 |
<varlistentry> |
| 1007 |
<term><varname>rescue</varname></term> |
| 1008 |
<term><varname>rd.rescue</varname></term> |
| 1009 |
<term><varname>single</varname></term> |
| 1010 |
<term><varname>1</varname></term> |
| 1011 |
|
| 1012 |
<listitem><para>Boot into rescue mode. Those options are equivalent to either |
| 1013 |
<varname>systemd.unit=rescue.target</varname> or <varname>rd.systemd.unit=rescue.target</varname>. |
| 1014 |
They were initially provided for compatibility with SysV, but are retained as convenient |
| 1015 |
shortcuts.</para> |
| 1016 |
|
| 1017 |
<xi:include href="version-info.xml" xpointer="v186"/></listitem> |
| 1018 |
</varlistentry> |
| 1019 |
|
| 1020 |
<varlistentry> |
| 1021 |
<term><varname>3</varname></term> |
| 1022 |
<term><varname>5</varname></term> |
| 1023 |
|
| 1024 |
<listitem><para>Shortcuts to boot into specific targets: <varname>3</varname> is equivalent to |
| 1025 |
<varname>systemd.unit=multi-user.target</varname> and <varname>5</varname> is equivalent to |
| 1026 |
<varname>systemd.unit=graphical.target</varname>. Those options were initially provided for |
| 1027 |
compatibility with SysV, but are retained as convenient shortcuts.</para> |
| 1028 |
|
| 1029 |
<xi:include href="version-info.xml" xpointer="v186"/></listitem> |
| 1030 |
</varlistentry> |
| 1031 |
|
| 1032 |
<varlistentry> |
| 1033 |
<term><varname>locale.LANG=</varname></term> |
| 1034 |
<term><varname>locale.LANGUAGE=</varname></term> |
| 1035 |
<term><varname>locale.LC_CTYPE=</varname></term> |
| 1036 |
<term><varname>locale.LC_NUMERIC=</varname></term> |
| 1037 |
<term><varname>locale.LC_TIME=</varname></term> |
| 1038 |
<term><varname>locale.LC_COLLATE=</varname></term> |
| 1039 |
<term><varname>locale.LC_MONETARY=</varname></term> |
| 1040 |
<term><varname>locale.LC_MESSAGES=</varname></term> |
| 1041 |
<term><varname>locale.LC_PAPER=</varname></term> |
| 1042 |
<term><varname>locale.LC_NAME=</varname></term> |
| 1043 |
<term><varname>locale.LC_ADDRESS=</varname></term> |
| 1044 |
<term><varname>locale.LC_TELEPHONE=</varname></term> |
| 1045 |
<term><varname>locale.LC_MEASUREMENT=</varname></term> |
| 1046 |
<term><varname>locale.LC_IDENTIFICATION=</varname></term> |
| 1047 |
|
| 1048 |
<listitem><para>Set the system locale to use. This overrides |
| 1049 |
the settings in <filename>/etc/locale.conf</filename>. For |
| 1050 |
more information, see |
| 1051 |
<citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 1052 |
and |
| 1053 |
<citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>. |
| 1054 |
</para> |
| 1055 |
|
| 1056 |
<xi:include href="version-info.xml" xpointer="v186"/></listitem> |
| 1057 |
</varlistentry> |
| 1058 |
|
| 1059 |
<varlistentry> |
| 1060 |
<term><varname>systemd.minimum_uptime_sec=</varname></term> |
| 1061 |
|
| 1062 |
<listitem><para>Takes a time in seconds. Specifies the minimum uptime of the system before the system |
| 1063 |
shuts down. For more information see the <varname>MinimumUptimeSec=</varname> setting described in |
| 1064 |
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> |
| 1065 |
|
| 1066 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 1067 |
</varlistentry> |
| 1068 |
</variablelist> |
| 1069 |
|
| 1070 |
<para>For other kernel command line parameters understood by |
| 1071 |
components of the core OS, please refer to |
| 1072 |
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 1073 |
</refsect1> |
| 1074 |
|
| 1075 |
<refsect1> |
| 1076 |
<title>System Credentials</title> |
| 1077 |
|
| 1078 |
<para>During initialization the service manager will import credentials from various sources into the |
| 1079 |
system's set of credentials, which can then be propagated into services and consumed by |
| 1080 |
generators:</para> |
| 1081 |
|
| 1082 |
<itemizedlist> |
| 1083 |
<listitem><para>When the service manager first initializes it will read system credentials from SMBIOS |
| 1084 |
Type 11 vendor strings |
| 1085 |
<varname>io.systemd.credential:<replaceable>name</replaceable>=<replaceable>value</replaceable></varname>, |
| 1086 |
and |
| 1087 |
<varname>io.systemd.credential.binary:<replaceable>name</replaceable>=<replaceable>value</replaceable></varname>.</para></listitem> |
| 1088 |
|
| 1089 |
<listitem><para>At the same time it will import credentials from QEMU <literal>fw_cfg</literal>. (Note |
| 1090 |
that the SMBIOS mechanism is generally preferred, because it is faster and generic.)</para></listitem> |
| 1091 |
|
| 1092 |
<listitem><para>Credentials may be passed via the kernel command line, using the |
| 1093 |
<varname>systemd.set-credential=</varname> parameter, see above.</para></listitem> |
| 1094 |
|
| 1095 |
<listitem><para>Credentials may be passed from the UEFI environment via |
| 1096 |
<citerefentry><refentrytitle>systemd-stub</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem> |
| 1097 |
|
| 1098 |
<listitem><para>When the service manager is invoked during the initrd → host transition it will import |
| 1099 |
all files in <filename>/run/credentials/@initrd/</filename> as system credentials.</para></listitem> |
| 1100 |
</itemizedlist> |
| 1101 |
|
| 1102 |
<para>Invoke |
| 1103 |
<citerefentry><refentrytitle>systemd-creds</refentrytitle><manvolnum>1</manvolnum></citerefentry> as |
| 1104 |
follows to see the list of credentials passed into the system:</para> |
| 1105 |
|
| 1106 |
<programlisting># systemd-creds --system list</programlisting> |
| 1107 |
|
| 1108 |
<para>For further information see <ulink url="https://systemd.io/CREDENTIALS">System and Service |
| 1109 |
Credentials</ulink> documentation.</para> |
| 1110 |
|
| 1111 |
<para>The service manager when run as PID 1 consumes the following system credentials:</para> |
| 1112 |
|
| 1113 |
<variablelist class='system-credentials'> |
| 1114 |
<varlistentry> |
| 1115 |
<term><varname>vmm.notify_socket</varname></term> |
| 1116 |
<listitem> |
| 1117 |
<para>Contains a <constant>AF_VSOCK</constant> or <constant>AF_UNIX</constant> address where to |
| 1118 |
send a <constant>READY=1</constant> notification message when the service manager has completed |
| 1119 |
booting. See |
| 1120 |
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> and |
| 1121 |
the next section for more information. Note that in case the hypervisor does not support |
| 1122 |
<constant>SOCK_DGRAM</constant> over <constant>AF_VSOCK</constant>, |
| 1123 |
<constant>SOCK_SEQPACKET</constant> will be tried instead. The credential payload for |
| 1124 |
<constant>AF_VSOCK</constant> should be a string in the form |
| 1125 |
<literal>vsock:CID:PORT</literal>. <literal>vsock-stream</literal>, <literal>vsock-dgram</literal> |
| 1126 |
and <literal>vsock-seqpacket</literal> can be used instead of <literal>vsock</literal> to force |
| 1127 |
usage of the corresponding socket type.</para> |
| 1128 |
|
| 1129 |
<para>This feature is useful for machine managers or other processes on the host to receive a |
| 1130 |
notification via VSOCK when a virtual machine has finished booting.</para> |
| 1131 |
|
| 1132 |
<xi:include href="version-info.xml" xpointer="v254"/> |
| 1133 |
</listitem> |
| 1134 |
</varlistentry> |
| 1135 |
|
| 1136 |
<varlistentry> |
| 1137 |
<term><varname>system.machine_id</varname></term> |
| 1138 |
<listitem> |
| 1139 |
<para>Takes a 128bit hexadecimal ID to initialize <filename>/etc/machine-id</filename> from, if the |
| 1140 |
file is not set up yet. See |
| 1141 |
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 1142 |
details.</para> |
| 1143 |
|
| 1144 |
<xi:include href="version-info.xml" xpointer="v254"/> |
| 1145 |
</listitem> |
| 1146 |
</varlistentry> |
| 1147 |
</variablelist> |
| 1148 |
|
| 1149 |
<para>For a list of system credentials various other components of systemd consume, see |
| 1150 |
<citerefentry><refentrytitle>systemd.system-credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 1151 |
</refsect1> |
| 1152 |
|
| 1153 |
<refsect1> |
| 1154 |
<title>Readiness Protocol</title> |
| 1155 |
|
| 1156 |
<para>The service manager implements a readiness notification protocol both between the manager and its |
| 1157 |
services (i.e. down the stack), and between the manager and a potential supervisor further up the stack |
| 1158 |
(the latter could be a machine or container manager, or in case of a per-user service manager the system |
| 1159 |
service manager instance). The basic protocol (and the suggested API for it) is described in |
| 1160 |
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> |
| 1161 |
|
| 1162 |
<para>The notification socket the service manager (including PID 1) uses for reporting readiness to its |
| 1163 |
own supervisor is set via the usual <varname>$NOTIFY_SOCKET</varname> environment variable (see |
| 1164 |
above). Since this is directly settable only for container managers and for the per-user instance of the |
| 1165 |
service manager, an additional mechanism to configure this is available, in particular intended for use |
| 1166 |
in VM environments: the <varname>vmm.notify_socket</varname> system credential (see above) may be set to |
| 1167 |
a suitable socket (typically an <constant>AF_VSOCK</constant> one) via SMBIOS Type 11 vendor strings. For |
| 1168 |
details see above.</para> |
| 1169 |
|
| 1170 |
<para>The notification protocol from the service manager up the stack towards a supervisor supports a |
| 1171 |
number of extension fields that allow a supervisor to learn about specific properties of the system and |
| 1172 |
track its boot progress. Specifically the following fields are sent:</para> |
| 1173 |
|
| 1174 |
<itemizedlist> |
| 1175 |
<listitem><para>An <varname>X_SYSTEMD_HOSTNAME=…</varname> message will be sent out once the initial |
| 1176 |
hostname for the system has been determined. Note that during later runtime the hostname might be |
| 1177 |
changed again programmatically, and (currently) no further notifications are sent out in that case.</para> |
| 1178 |
|
| 1179 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1180 |
|
| 1181 |
<listitem><para>An <varname>X_SYSTEMD_MACHINE_ID=…</varname> message will be sent out once the machine |
| 1182 |
ID of the system has been determined. See |
| 1183 |
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 1184 |
details.</para> |
| 1185 |
|
| 1186 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1187 |
|
| 1188 |
<listitem><para>An <varname>X_SYSTEMD_SIGNALS_LEVEL=…</varname> message will be sent out once the |
| 1189 |
service manager installed the various UNIX process signal handlers described above. The field's value |
| 1190 |
is an unsigned integer formatted as decimal string, and indicates the supported UNIX process signal |
| 1191 |
feature level of the service manager. Currently, only a single feature level is defined:</para> |
| 1192 |
|
| 1193 |
<itemizedlist> |
| 1194 |
<listitem><para><varname>X_SYSTEMD_SIGNALS_LEVEL=2</varname> covers the various UNIX process signals |
| 1195 |
documented above – which are a superset of those supported by the historical SysV init |
| 1196 |
system.</para></listitem> |
| 1197 |
</itemizedlist> |
| 1198 |
|
| 1199 |
<para>Signals sent to PID 1 before this message is sent might not be handled correctly yet. A consumer |
| 1200 |
of these messages should parse the value as an unsigned integer that indicates the level of support. |
| 1201 |
For now only the mentioned level 2 is defined, but later on additional levels might be defined with |
| 1202 |
higher integers, that will implement a superset of the currently defined behaviour.</para> |
| 1203 |
|
| 1204 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1205 |
|
| 1206 |
<listitem><para><varname>X_SYSTEMD_UNIT_ACTIVE=…</varname> and |
| 1207 |
<varname>X_SYSTEMD_UNIT_INACTIVE=…</varname> messages will be sent out for each target unit as it |
| 1208 |
becomes active or stops being active. This is useful to track boot progress and functionality. For |
| 1209 |
example, once the <filename>ssh-access.target</filename> unit is reported started SSH access is |
| 1210 |
typically available, see |
| 1211 |
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> for |
| 1212 |
details.</para> |
| 1213 |
|
| 1214 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1215 |
|
| 1216 |
<listitem><para>An <varname>X_SYSTEMD_SHUTDOWN=…</varname> message will be sent out very shortly before |
| 1217 |
the system shuts down. The value is one of the strings <literal>reboot</literal>, |
| 1218 |
<literal>halt</literal>, <literal>poweroff</literal>, <literal>kexec</literal> and indicates which kind |
| 1219 |
of shutdown is being executed.</para> |
| 1220 |
|
| 1221 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1222 |
|
| 1223 |
<listitem><para>An <varname>X_SYSTEMD_REBOOT_PARAMETER=…</varname> message will also be sent out very |
| 1224 |
shortly before the system shuts down. Its value is the reboot argument as configured with |
| 1225 |
<command>systemctl --reboot-argument=…</command>.</para> |
| 1226 |
|
| 1227 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1228 |
</itemizedlist> |
| 1229 |
|
| 1230 |
<para>Note that these extension fields are sent in addition to the regular <literal>READY=1</literal> and |
| 1231 |
<literal>RELOADING=1</literal> notifications.</para> |
| 1232 |
</refsect1> |
| 1233 |
|
| 1234 |
<refsect1> |
| 1235 |
<title>Options</title> |
| 1236 |
|
| 1237 |
<para><command>systemd</command> is only very rarely invoked directly, since it is started early and is |
| 1238 |
already running by the time users may interact with it. Normally, tools like |
| 1239 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> are used to |
| 1240 |
give commands to the manager. Since <command>systemd</command> is usually not invoked directly, the |
| 1241 |
options listed below are mostly useful for debugging and special purposes.</para> |
| 1242 |
|
| 1243 |
<refsect2> |
| 1244 |
<title>Introspection and debugging options</title> |
| 1245 |
|
| 1246 |
<para>Those options are used for testing and introspection, and <command>systemd</command> may |
| 1247 |
be invoked with them at any time:</para> |
| 1248 |
|
| 1249 |
<variablelist> |
| 1250 |
<varlistentry> |
| 1251 |
<term><option>--dump-configuration-items</option></term> |
| 1252 |
|
| 1253 |
<listitem><para>Dump understood unit configuration items. This outputs a terse but complete list of |
| 1254 |
configuration items understood in unit definition files.</para></listitem> |
| 1255 |
</varlistentry> |
| 1256 |
|
| 1257 |
<varlistentry> |
| 1258 |
<term><option>--dump-bus-properties</option></term> |
| 1259 |
|
| 1260 |
<listitem><para>Dump exposed bus properties. This outputs a terse but complete list of properties |
| 1261 |
exposed on D-Bus.</para> |
| 1262 |
|
| 1263 |
<xi:include href="version-info.xml" xpointer="v239"/></listitem> |
| 1264 |
</varlistentry> |
| 1265 |
|
| 1266 |
<varlistentry> |
| 1267 |
<term><option>--test</option></term> |
| 1268 |
|
| 1269 |
<listitem><para>Determine the initial start-up transaction (i.e. the list of jobs enqueued at |
| 1270 |
start-up), dump it and exit — without actually executing any of the determined jobs. This option is |
| 1271 |
useful for debugging only. Note that during regular service manager start-up additional units not |
| 1272 |
shown by this operation may be started, because hardware, socket, bus or other kinds of activation |
| 1273 |
might add additional jobs as the transaction is executed. Use <option>--system</option> to request |
| 1274 |
the initial transaction of the system service manager (this is also the implied default), combine |
| 1275 |
with <option>--user</option> to request the initial transaction of the per-user service manager |
| 1276 |
instead.</para></listitem> |
| 1277 |
</varlistentry> |
| 1278 |
|
| 1279 |
<varlistentry> |
| 1280 |
<term><option>--system</option></term> |
| 1281 |
<term><option>--user</option></term> |
| 1282 |
|
| 1283 |
<listitem><para>When used in conjunction with <option>--test</option>, selects whether to calculate |
| 1284 |
the initial transaction for the system instance or for a per-user instance. These options have no |
| 1285 |
effect when invoked without <option>--test</option>, as during regular |
| 1286 |
(i.e. non-<option>--test</option>) invocations the service manager will automatically detect |
| 1287 |
whether it shall operate in system or per-user mode, by checking whether the PID it is run as is 1 |
| 1288 |
or not. Note that it is not supported booting and maintaining a system with the service manager |
| 1289 |
running in <option>--system</option> mode but with a PID other than 1.</para></listitem> |
| 1290 |
</varlistentry> |
| 1291 |
|
| 1292 |
<xi:include href="standard-options.xml" xpointer="help" /> |
| 1293 |
<xi:include href="standard-options.xml" xpointer="version" /> |
| 1294 |
</variablelist> |
| 1295 |
</refsect2> |
| 1296 |
|
| 1297 |
<refsect2> |
| 1298 |
<title>Options that duplicate kernel command line settings</title> |
| 1299 |
|
| 1300 |
<para>Those options correspond directly to options listed above in "Kernel Command Line". Both forms |
| 1301 |
may be used equivalently for the system manager, but it is recommended to use the forms listed above in |
| 1302 |
this context, because they are properly namespaced. When an option is specified both on the kernel |
| 1303 |
command line and as a normal command line argument, the latter has higher precedence.</para> |
| 1304 |
|
| 1305 |
<para>When <command>systemd</command> is used as a user manager, the kernel command line is ignored and |
| 1306 |
only the options described below are understood. Nevertheless, <command>systemd</command> is usually |
| 1307 |
started in this mode through the |
| 1308 |
<citerefentry><refentrytitle>[email protected]</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 1309 |
service, which is shared between all users. It may be more convenient to use configuration files to |
| 1310 |
modify settings (see |
| 1311 |
<citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>), |
| 1312 |
or environment variables. See the "Environment" section above for a discussion of how the environment |
| 1313 |
block is set.</para> |
| 1314 |
|
| 1315 |
<variablelist> |
| 1316 |
<varlistentry> |
| 1317 |
<term><option>--unit=</option></term> |
| 1318 |
|
| 1319 |
<listitem><para>Set default unit to activate on startup. If not specified, defaults to |
| 1320 |
<filename>default.target</filename>. See <varname>systemd.unit=</varname> above.</para></listitem> |
| 1321 |
</varlistentry> |
| 1322 |
|
| 1323 |
<varlistentry> |
| 1324 |
<term><option>--dump-core</option></term> |
| 1325 |
|
| 1326 |
<listitem><para>Enable core dumping on crash. This switch has no effect when running as user |
| 1327 |
instance. Same as <varname>systemd.dump_core=</varname> above.</para></listitem> |
| 1328 |
</varlistentry> |
| 1329 |
|
| 1330 |
<varlistentry> |
| 1331 |
<term><option>--crash-vt=<replaceable>VT</replaceable></option></term> |
| 1332 |
|
| 1333 |
<listitem><para>Switch to a specific virtual console (VT) on crash. This switch has no effect when |
| 1334 |
running as user instance. Same as <varname>systemd.crash_chvt=</varname> above (but not the |
| 1335 |
different spelling!).</para> |
| 1336 |
|
| 1337 |
<xi:include href="version-info.xml" xpointer="v227"/></listitem> |
| 1338 |
</varlistentry> |
| 1339 |
|
| 1340 |
<varlistentry> |
| 1341 |
<term><option>--crash-shell</option></term> |
| 1342 |
|
| 1343 |
<listitem><para>Run a shell on crash. This switch has no effect when running as user instance. See |
| 1344 |
<varname>systemd.crash_shell=</varname> above.</para></listitem> |
| 1345 |
</varlistentry> |
| 1346 |
|
| 1347 |
<varlistentry> |
| 1348 |
<term><option>--crash-action=</option></term> |
| 1349 |
|
| 1350 |
<listitem><para>Specify what to do when the system manager (PID 1) crashes. This switch has no |
| 1351 |
effect when <command>systemd</command> is running as user instance. See |
| 1352 |
<varname>systemd.crash_action=</varname> above.</para> |
| 1353 |
|
| 1354 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 1355 |
</varlistentry> |
| 1356 |
|
| 1357 |
<varlistentry> |
| 1358 |
<term><option>--confirm-spawn</option></term> |
| 1359 |
|
| 1360 |
<listitem><para>Ask for confirmation when spawning processes. This switch has no effect when run as |
| 1361 |
user instance. See <varname>systemd.confirm_spawn</varname> above.</para></listitem> |
| 1362 |
</varlistentry> |
| 1363 |
|
| 1364 |
<varlistentry> |
| 1365 |
<term><option>--show-status</option></term> |
| 1366 |
|
| 1367 |
<listitem><para>Show terse unit status information on the console during boot-up and shutdown. See |
| 1368 |
<varname>systemd.show_status</varname> above.</para> |
| 1369 |
|
| 1370 |
<xi:include href="version-info.xml" xpointer="v244"/></listitem> |
| 1371 |
</varlistentry> |
| 1372 |
|
| 1373 |
<varlistentry> |
| 1374 |
<term><option>--log-color</option></term> |
| 1375 |
|
| 1376 |
<listitem><para>Highlight important log messages. See <varname>systemd.log_color</varname> above. |
| 1377 |
</para> |
| 1378 |
|
| 1379 |
<xi:include href="version-info.xml" xpointer="v244"/></listitem> |
| 1380 |
</varlistentry> |
| 1381 |
|
| 1382 |
<varlistentry> |
| 1383 |
<term><option>--log-level=</option></term> |
| 1384 |
|
| 1385 |
<listitem><para>Set log level. See <varname>systemd.log_level</varname> above.</para></listitem> |
| 1386 |
</varlistentry> |
| 1387 |
|
| 1388 |
<varlistentry> |
| 1389 |
<term><option>--log-location</option></term> |
| 1390 |
|
| 1391 |
<listitem><para>Include code location in log messages. See <varname>systemd.log_location</varname> |
| 1392 |
above.</para> |
| 1393 |
|
| 1394 |
<xi:include href="version-info.xml" xpointer="v244"/></listitem> |
| 1395 |
</varlistentry> |
| 1396 |
|
| 1397 |
<varlistentry> |
| 1398 |
<term><option>--log-target=</option></term> |
| 1399 |
|
| 1400 |
<listitem><para>Set log target. See <varname>systemd.log_target</varname> above.</para></listitem> |
| 1401 |
</varlistentry> |
| 1402 |
|
| 1403 |
<varlistentry> |
| 1404 |
<term><option>--log-time=</option></term> |
| 1405 |
|
| 1406 |
<listitem><para>Prefix console messages with timestamp. See <varname>systemd.log_time</varname> above. |
| 1407 |
</para> |
| 1408 |
|
| 1409 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 1410 |
</varlistentry> |
| 1411 |
|
| 1412 |
<varlistentry> |
| 1413 |
<term><option>--machine-id=</option></term> |
| 1414 |
|
| 1415 |
<listitem><para>Override the machine-id set on the hard drive. See |
| 1416 |
<varname>systemd.machine_id=</varname> above.</para> |
| 1417 |
|
| 1418 |
<xi:include href="version-info.xml" xpointer="v229"/></listitem> |
| 1419 |
</varlistentry> |
| 1420 |
|
| 1421 |
<varlistentry> |
| 1422 |
<term><option>--service-watchdogs</option></term> |
| 1423 |
|
| 1424 |
<listitem><para>Globally enable/disable all service watchdog timeouts and emergency actions. See |
| 1425 |
<varname>systemd.service_watchdogs</varname> above.</para> |
| 1426 |
|
| 1427 |
<xi:include href="version-info.xml" xpointer="v237"/></listitem> |
| 1428 |
</varlistentry> |
| 1429 |
|
| 1430 |
<varlistentry> |
| 1431 |
<term><option>--default-standard-output=</option></term> |
| 1432 |
<term><option>--default-standard-error=</option></term> |
| 1433 |
|
| 1434 |
<listitem><para>Sets the default output or error output for all services and sockets, |
| 1435 |
respectively. See <varname>systemd.default_standard_output=</varname> and |
| 1436 |
<varname>systemd.default_standard_error=</varname> above.</para></listitem> |
| 1437 |
</varlistentry> |
| 1438 |
</variablelist> |
| 1439 |
</refsect2> |
| 1440 |
</refsect1> |
| 1441 |
|
| 1442 |
<refsect1> |
| 1443 |
<title>System clock epoch</title> |
| 1444 |
|
| 1445 |
<para>When <command>systemd</command> is started or restarted, it may set the system clock to the |
| 1446 |
"epoch". This mechanism is used to ensure that the system clock remains somewhat reasonably initialized |
| 1447 |
and roughly monotonic across reboots, in case no battery-backed local RTC is available or it does not |
| 1448 |
work correctly.</para> |
| 1449 |
|
| 1450 |
<para>The epoch is the lowest date above which the system clock time is assumed to be set correctly. When |
| 1451 |
initializing, the local clock is <emphasis>advanced</emphasis> to the epoch if it was set to a lower |
| 1452 |
value. As a special case, if the local clock is sufficiently far in the future (by default 15 years, but |
| 1453 |
this can be configured at build time), the hardware clock is assumed to be broken, and the system clock |
| 1454 |
is <emphasis>rewound</emphasis> to the epoch.</para> |
| 1455 |
|
| 1456 |
<para>The epoch is set to the highest of: the build time of <filename>systemd</filename>, the |
| 1457 |
modification time ("mtime") of <filename>/usr/lib/clock-epoch</filename>, and the modification time of |
| 1458 |
<filename>/var/lib/systemd/timesync/clock</filename>.</para> |
| 1459 |
</refsect1> |
| 1460 |
|
| 1461 |
<refsect1> |
| 1462 |
<title>Files</title> |
| 1463 |
|
| 1464 |
<variablelist> |
| 1465 |
<varlistentry> |
| 1466 |
<term><filename>/run/systemd/notify</filename></term> |
| 1467 |
|
| 1468 |
<listitem><para>Daemon status notification socket. This is an |
| 1469 |
<constant>AF_UNIX</constant> datagram socket and is used to |
| 1470 |
implement the daemon notification logic as implemented by |
| 1471 |
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem> |
| 1472 |
|
| 1473 |
</varlistentry> |
| 1474 |
|
| 1475 |
<varlistentry> |
| 1476 |
<term><filename>/run/systemd/private</filename></term> |
| 1477 |
|
| 1478 |
<listitem><para>Used internally as communication channel |
| 1479 |
between |
| 1480 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 1481 |
and the systemd process. This is an |
| 1482 |
<constant>AF_UNIX</constant> stream socket. This interface is |
| 1483 |
private to systemd and should not be used in external |
| 1484 |
projects.</para></listitem> |
| 1485 |
</varlistentry> |
| 1486 |
|
| 1487 |
<varlistentry> |
| 1488 |
<term><filename>/usr/lib/clock-epoch</filename></term> |
| 1489 |
|
| 1490 |
<listitem><para>The modification time ("mtime") of this file is used for the time epoch, see previous |
| 1491 |
section.</para> |
| 1492 |
|
| 1493 |
<xi:include href="version-info.xml" xpointer="v247"/></listitem> |
| 1494 |
</varlistentry> |
| 1495 |
|
| 1496 |
<varlistentry> |
| 1497 |
<term><filename>/var/lib/systemd/timesync/clock</filename></term> |
| 1498 |
|
| 1499 |
<listitem><para>The modification time ("mtime") of this file is updated by |
| 1500 |
<citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
| 1501 |
If present, the modification time of file is used for the epoch, see previous section. |
| 1502 |
</para> |
| 1503 |
|
| 1504 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 1505 |
</varlistentry> |
| 1506 |
</variablelist> |
| 1507 |
</refsect1> |
| 1508 |
|
| 1509 |
<refsect1> |
| 1510 |
<title>History</title> |
| 1511 |
|
| 1512 |
<variablelist> |
| 1513 |
<varlistentry> |
| 1514 |
<term>systemd 252</term> |
| 1515 |
|
| 1516 |
<listitem><para>Kernel command-line arguments <varname>systemd.unified_cgroup_hierarchy</varname> |
| 1517 |
and <varname>systemd.legacy_systemd_cgroup_controller</varname> were deprecated. Please switch to |
| 1518 |
the unified cgroup hierarchy.</para></listitem> |
| 1519 |
</varlistentry> |
| 1520 |
</variablelist> |
| 1521 |
</refsect1> |
| 1522 |
|
| 1523 |
<refsect1> |
| 1524 |
<title>See Also</title> |
| 1525 |
<para><simplelist type="inline"> |
| 1526 |
<member>The <ulink url="https://systemd.io/">systemd Homepage</ulink></member> |
| 1527 |
<member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 1528 |
<member><citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 1529 |
<member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 1530 |
<member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 1531 |
<member><citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 1532 |
<member><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 1533 |
<member><citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 1534 |
<member><citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 1535 |
<member><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 1536 |
<member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 1537 |
<member><citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 1538 |
<member><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 1539 |
<member><citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 1540 |
<member><citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 1541 |
<member><citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 1542 |
</simplelist></para> |
| 1543 |
|
| 1544 |
<para>For more information about the concepts and |
| 1545 |
ideas behind systemd, please refer to the |
| 1546 |
<ulink url="https://0pointer.de/blog/projects/systemd.html">Original Design Document</ulink>.</para> |
| 1547 |
</refsect1> |
| 1548 |
|
| 1549 |
</refentry> |