]> git.proxmox.com Git - systemd.git/blame - man/systemd-system.conf.xml
New upstream version 249~rc1
[systemd.git] / man / systemd-system.conf.xml
CommitLineData
6e866b33 1<?xml version='1.0'?>
bb4f798a 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
98393f85
MB
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4<!ENTITY % entities SYSTEM "custom-entities.ent" >
5%entities;
6]>
a032b68d 7<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
663996b3 8
f47781d8 9<refentry id="systemd-system.conf"
e735f4d4
MP
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11 <refentryinfo>
12 <title>systemd-system.conf</title>
13 <productname>systemd</productname>
e735f4d4
MP
14 </refentryinfo>
15
16 <refmeta>
17 <refentrytitle>systemd-system.conf</refentrytitle>
18 <manvolnum>5</manvolnum>
19 </refmeta>
20
21 <refnamediv>
22 <refname>systemd-system.conf</refname>
23 <refname>system.conf.d</refname>
24 <refname>systemd-user.conf</refname>
25 <refname>user.conf.d</refname>
26 <refpurpose>System and session service manager configuration files</refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
6300502b
MP
30 <para><filename>/etc/systemd/system.conf</filename>,
31 <filename>/etc/systemd/system.conf.d/*.conf</filename>,
32 <filename>/run/systemd/system.conf.d/*.conf</filename>,
33 <filename>/usr/lib/systemd/system.conf.d/*.conf</filename></para>
3a6ce677
BR
34
35 <para><filename>~/.config/systemd/user.conf</filename>,
36 <filename>/etc/systemd/user.conf</filename>,
6300502b
MP
37 <filename>/etc/systemd/user.conf.d/*.conf</filename>,
38 <filename>/run/systemd/user.conf.d/*.conf</filename>,
39 <filename>/usr/lib/systemd/user.conf.d/*.conf</filename></para>
e735f4d4
MP
40 </refsynopsisdiv>
41
42 <refsect1>
43 <title>Description</title>
44
3a6ce677
BR
45 <para>When run as a system instance, <command>systemd</command> interprets the configuration file
46 <filename>system.conf</filename> and the files in <filename>system.conf.d</filename> directories; when
47 run as a user instance, it interprets the configuration file <filename>user.conf</filename> (either in
48 the home directory of the user, or if not found, under <filename>/etc/systemd/</filename>) and the files
49 in <filename>user.conf.d</filename> directories. These configuration files contain a few settings
50 controlling basic manager operations.</para>
51
52 <para>See
53 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry> for a
54 general description of the syntax.</para>
e735f4d4
MP
55 </refsect1>
56
e3bff60a 57 <xi:include href="standard-conf.xml" xpointer="main-conf" />
e735f4d4
MP
58
59 <refsect1>
60 <title>Options</title>
61
62 <para>All options are configured in the
a10f5d05 63 [Manager] section:</para>
e735f4d4 64
7c20daf6 65 <variablelist class='config-directives'>
e735f4d4
MP
66
67 <varlistentry>
e735f4d4 68 <term><varname>LogColor=</varname></term>
a10f5d05 69 <term><varname>LogLevel=</varname></term>
e735f4d4 70 <term><varname>LogLocation=</varname></term>
a10f5d05
MB
71 <term><varname>LogTarget=</varname></term>
72 <term><varname>LogTime=</varname></term>
e735f4d4 73 <term><varname>DumpCore=yes</varname></term>
6300502b 74 <term><varname>CrashChangeVT=no</varname></term>
e735f4d4 75 <term><varname>CrashShell=no</varname></term>
6300502b 76 <term><varname>CrashReboot=no</varname></term>
e735f4d4 77 <term><varname>ShowStatus=yes</varname></term>
e735f4d4
MP
78 <term><varname>DefaultStandardOutput=journal</varname></term>
79 <term><varname>DefaultStandardError=inherit</varname></term>
80
2897b343
MP
81 <listitem><para>Configures various parameters of basic manager operation. These options may be overridden by
82 the respective process and kernel command line arguments. See
83 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
84 details.</para></listitem>
e735f4d4
MP
85 </varlistentry>
86
8a584da2
MP
87 <varlistentry>
88 <term><varname>CtrlAltDelBurstAction=</varname></term>
89
90 <listitem><para>Defines what action will be performed
91 if user presses Ctrl-Alt-Delete more than 7 times in 2s.
92 Can be set to <literal>reboot-force</literal>, <literal>poweroff-force</literal>,
93 <literal>reboot-immediate</literal>, <literal>poweroff-immediate</literal>
94 or disabled with <literal>none</literal>. Defaults to
95 <literal>reboot-force</literal>.
96 </para></listitem>
97 </varlistentry>
98
e735f4d4
MP
99 <varlistentry>
100 <term><varname>CPUAffinity=</varname></term>
101
f2dec872
BR
102 <listitem><para>Configures the CPU affinity for the service manager as well as the default CPU
103 affinity for all forked off processes. Takes a list of CPU indices or ranges separated by either
104 whitespace or commas. CPU ranges are specified by the lower and upper CPU indices separated by a
105 dash. This option may be specified more than once, in which case the specified CPU affinity masks are
106 merged. If the empty string is assigned, the mask is reset, all assignments prior to this will have
107 no effect. Individual services may override the CPU affinity for their processes with the
108 <varname>CPUAffinity=</varname> setting in unit files, see
109 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
110 </varlistentry>
111
112 <varlistentry>
113 <term><varname>NUMAPolicy=</varname></term>
114
115 <listitem><para>Configures the NUMA memory policy for the service manager and the default NUMA memory policy
116 for all forked off processes. Individual services may override the default policy with the
117 <varname>NUMAPolicy=</varname> setting in unit files, see
118 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
119 </varlistentry>
120
121 <varlistentry>
122 <term><varname>NUMAMask=</varname></term>
123
124 <listitem><para>Configures the NUMA node mask that will be associated with the selected NUMA policy. Note that
125 <option>default</option> and <option>local</option> NUMA policies don't require explicit NUMA node mask and
126 value of the option can be empty. Similarly to <varname>NUMAPolicy=</varname>, value can be overridden
127 by individual services in unit files, see
6e866b33 128 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
e735f4d4
MP
129 </varlistentry>
130
131 <varlistentry>
132 <term><varname>RuntimeWatchdogSec=</varname></term>
f2dec872
BR
133 <term><varname>RebootWatchdogSec=</varname></term>
134 <term><varname>KExecWatchdogSec=</varname></term>
e735f4d4 135
b012e921
MB
136 <listitem><para>Configure the hardware watchdog at runtime and at reboot. Takes a timeout value in seconds (or
137 in other time units if suffixed with <literal>ms</literal>, <literal>min</literal>, <literal>h</literal>,
138 <literal>d</literal>, <literal>w</literal>). If <varname>RuntimeWatchdogSec=</varname> is set to a non-zero
139 value, the watchdog hardware (<filename>/dev/watchdog</filename> or the path specified with
140 <varname>WatchdogDevice=</varname> or the kernel option <varname>systemd.watchdog-device=</varname>) will be
141 programmed to automatically reboot the system if it is not contacted within the specified timeout interval. The
142 system manager will ensure to contact it at least once in half the specified timeout interval. This feature
143 requires a hardware watchdog device to be present, as it is commonly the case in embedded and server
144 systems. Not all hardware watchdogs allow configuration of all possible reboot timeout values, in which case
f2dec872 145 the closest available timeout is picked. <varname>RebootWatchdogSec=</varname> may be used to configure the
b012e921 146 hardware watchdog when the system is asked to reboot. It works as a safety net to ensure that the reboot takes
f2dec872 147 place even if a clean reboot attempt times out. Note that the <varname>RebootWatchdogSec=</varname> timeout
b012e921
MB
148 applies only to the second phase of the reboot, i.e. after all regular services are already terminated, and
149 after the system and service manager process (PID 1) got replaced by the <filename>systemd-shutdown</filename>
150 binary, see system <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>
151 for details. During the first phase of the shutdown operation the system and service manager remains running
152 and hence <varname>RuntimeWatchdogSec=</varname> is still honoured. In order to define a timeout on this first
153 phase of system shutdown, configure <varname>JobTimeoutSec=</varname> and <varname>JobTimeoutAction=</varname>
a10f5d05 154 in the [Unit] section of the <filename>shutdown.target</filename> unit. By default
f2dec872
BR
155 <varname>RuntimeWatchdogSec=</varname> defaults to 0 (off), and <varname>RebootWatchdogSec=</varname> to
156 10min. <varname>KExecWatchdogSec=</varname> may be used to additionally enable the watchdog when kexec
157 is being executed rather than when rebooting. Note that if the kernel does not reset the watchdog on kexec (depending
158 on the specific hardware and/or driver), in this case the watchdog might not get disabled after kexec succeeds
159 and thus the system might get rebooted, unless <varname>RuntimeWatchdogSec=</varname> is also enabled at the same time.
160 For this reason it is recommended to enable <varname>KExecWatchdogSec=</varname> only if
161 <varname>RuntimeWatchdogSec=</varname> is also enabled.
162 These settings have no effect if a hardware watchdog is not available.</para></listitem>
e735f4d4
MP
163 </varlistentry>
164
52ad194e
MB
165 <varlistentry>
166 <term><varname>WatchdogDevice=</varname></term>
167
168 <listitem><para>Configure the hardware watchdog device that the
169 runtime and shutdown watchdog timers will open and use. Defaults
170 to <filename>/dev/watchdog</filename>. This setting has no
171 effect if a hardware watchdog is not available.</para></listitem>
172 </varlistentry>
173
e735f4d4
MP
174 <varlistentry>
175 <term><varname>CapabilityBoundingSet=</varname></term>
176
177 <listitem><para>Controls which capabilities to include in the
178 capability bounding set for PID 1 and its children. See
179 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
180 for details. Takes a whitespace-separated list of capability
181 names as read by
e3bff60a 182 <citerefentry project='mankier'><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
e735f4d4
MP
183 Capabilities listed will be included in the bounding set, all
184 others are removed. If the list of capabilities is prefixed
185 with ~, all but the listed capabilities will be included, the
186 effect of the assignment inverted. Note that this option also
187 affects the respective capabilities in the effective,
188 permitted and inheritable capability sets. The capability
189 bounding set may also be individually configured for units
190 using the <varname>CapabilityBoundingSet=</varname> directive
191 for units, but note that capabilities dropped for PID 1 cannot
192 be regained in individual units, they are lost for
193 good.</para></listitem>
194 </varlistentry>
195
b012e921
MB
196 <varlistentry>
197 <term><varname>NoNewPrivileges=</varname></term>
198
199 <listitem><para>Takes a boolean argument. If true, ensures that PID 1
200 and all its children can never gain new privileges through
201 <citerefentry project='man-pages'><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>
202 (e.g. via setuid or setgid bits, or filesystem capabilities).
203 Defaults to false. General purpose distributions commonly rely
204 on executables with setuid or setgid bits and will thus not
205 function properly with this option enabled. Individual units
206 cannot disable this option.
207 Also see <ulink url="https://www.kernel.org/doc/html/latest/userspace-api/no_new_privs.html">No New Privileges Flag</ulink>.
208 </para></listitem>
209 </varlistentry>
210
e735f4d4
MP
211 <varlistentry>
212 <term><varname>SystemCallArchitectures=</varname></term>
213
214 <listitem><para>Takes a space-separated list of architecture
215 identifiers. Selects from which architectures system calls may
216 be invoked on this system. This may be used as an effective
217 way to disable invocation of non-native binaries system-wide,
218 for example to prohibit execution of 32-bit x86 binaries on
219 64-bit x86-64 systems. This option operates system-wide, and
220 acts similar to the
221 <varname>SystemCallArchitectures=</varname> setting of unit
222 files, see
223 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
224 for details. This setting defaults to the empty list, in which
225 case no filtering of system calls based on architecture is
226 applied. Known architecture identifiers are
227 <literal>x86</literal>, <literal>x86-64</literal>,
228 <literal>x32</literal>, <literal>arm</literal> and the special
229 identifier <literal>native</literal>. The latter implicitly
230 maps to the native architecture of the system (or more
231 specifically, the architecture the system manager was compiled
232 for). Set this setting to <literal>native</literal> to
233 prohibit execution of any non-native binaries. When a binary
234 executes a system call of an architecture that is not listed
235 in this setting, it will be immediately terminated with the
236 SIGSYS signal.</para></listitem>
237 </varlistentry>
238
239 <varlistentry>
240 <term><varname>TimerSlackNSec=</varname></term>
241
242 <listitem><para>Sets the timer slack in nanoseconds for PID 1,
243 which is inherited by all executed processes, unless
244 overridden individually, for example with the
245 <varname>TimerSlackNSec=</varname> setting in service units
246 (for details see
247 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
248 The timer slack controls the accuracy of wake-ups triggered by
249 system timers. See
250 <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
251 for more information. Note that in contrast to most other time
252 span definitions this parameter takes an integer value in
253 nano-seconds if no unit is specified. The usual time units are
254 understood too.</para></listitem>
255 </varlistentry>
256
f2dec872
BR
257 <varlistentry>
258 <term><varname>StatusUnitFormat=</varname></term>
259
260 <listitem><para>Takes either <option>name</option> or <option>description</option> as the value. If
261 <option>name</option>, the system manager will use unit names in status messages, instead of the
262 longer and more informative descriptions set with <varname>Description=</varname>, see
263 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
264 </para></listitem>
265 </varlistentry>
266
e735f4d4
MP
267 <varlistentry>
268 <term><varname>DefaultTimerAccuracySec=</varname></term>
269
270 <listitem><para>Sets the default accuracy of timer units. This
271 controls the global default for the
272 <varname>AccuracySec=</varname> setting of timer units, see
273 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
274 for details. <varname>AccuracySec=</varname> set in individual
275 units override the global default for the specific unit.
276 Defaults to 1min. Note that the accuracy of timer units is
277 also affected by the configured timer slack for PID 1, see
278 <varname>TimerSlackNSec=</varname> above.</para></listitem>
279 </varlistentry>
280
281 <varlistentry>
282 <term><varname>DefaultTimeoutStartSec=</varname></term>
283 <term><varname>DefaultTimeoutStopSec=</varname></term>
f2dec872 284 <term><varname>DefaultTimeoutAbortSec=</varname></term>
e735f4d4
MP
285 <term><varname>DefaultRestartSec=</varname></term>
286
f2dec872
BR
287 <listitem><para>Configures the default timeouts for starting,
288 stopping and aborting of units, as well as the default time to sleep
e735f4d4
MP
289 between automatic restarts of units, as configured per-unit in
290 <varname>TimeoutStartSec=</varname>,
f2dec872
BR
291 <varname>TimeoutStopSec=</varname>,
292 <varname>TimeoutAbortSec=</varname> and
e735f4d4
MP
293 <varname>RestartSec=</varname> (for services, see
294 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
7c20daf6
FS
295 for details on the per-unit settings). Disabled by default, when
296 service with <varname>Type=oneshot</varname> is used.
297 For non-service units,
e735f4d4 298 <varname>DefaultTimeoutStartSec=</varname> sets the default
e3bff60a
MP
299 <varname>TimeoutSec=</varname>
300 value. <varname>DefaultTimeoutStartSec=</varname> and
301 <varname>DefaultTimeoutStopSec=</varname> default to
f2dec872
BR
302 90s. <varname>DefaultTimeoutAbortSec=</varname> is not set by default
303 so that all units fall back to <varname>TimeoutStopSec=</varname>.
304 <varname>DefaultRestartSec=</varname> defaults to
e3bff60a 305 100ms.</para></listitem>
e735f4d4
MP
306 </varlistentry>
307
308 <varlistentry>
aa27b158 309 <term><varname>DefaultStartLimitIntervalSec=</varname></term>
e735f4d4
MP
310 <term><varname>DefaultStartLimitBurst=</varname></term>
311
312 <listitem><para>Configure the default unit start rate
313 limiting, as configured per-service by
aa27b158 314 <varname>StartLimitIntervalSec=</varname> and
e735f4d4
MP
315 <varname>StartLimitBurst=</varname>. See
316 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
e3bff60a 317 for details on the per-service settings.
aa27b158 318 <varname>DefaultStartLimitIntervalSec=</varname> defaults to
e3bff60a
MP
319 10s. <varname>DefaultStartLimitBurst=</varname> defaults to
320 5.</para></listitem>
e735f4d4
MP
321 </varlistentry>
322
323 <varlistentry>
324 <term><varname>DefaultEnvironment=</varname></term>
325
3a6ce677
BR
326 <listitem><para>Configures environment variables passed to all executed processes. Takes a
327 space-separated list of variable assignments. See <citerefentry
328 project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
329 details about environment variables.</para>
e735f4d4 330
8b3d4ff0
MB
331 <para>Simple <literal>%</literal>-specifier expansion is supported, see below for a list of supported
332 specifiers.</para>
333
e735f4d4
MP
334 <para>Example:
335
336 <programlisting>DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
337
338 Sets three variables
339 <literal>VAR1</literal>,
340 <literal>VAR2</literal>,
341 <literal>VAR3</literal>.</para></listitem>
342 </varlistentry>
343
3a6ce677
BR
344 <varlistentry>
345 <term><varname>ManagerEnvironment=</varname></term>
346
347 <listitem><para>Takes the same arguments as <varname>DefaultEnvironment=</varname>, see above. Sets
8b3d4ff0
MB
348 environment variables just for the manager process itself. In contrast to user managers, these variables
349 are not inherited by processes spawned by the system manager, use <varname>DefaultEnvironment=</varname>
350 for that. Note that these variables are merged into the existing environment block. In particular, in
351 case of the system manager, this includes variables set by the kernel based on the kernel command line.</para>
3a6ce677
BR
352
353 <para>Setting environment variables for the manager process may be useful to modify its behaviour.
354 See <ulink url="https://systemd.io/ENVIRONMENT">ENVIRONMENT</ulink> for a descriptions of some
8b3d4ff0
MB
355 variables understood by <command>systemd</command>.</para>
356
357 <para>Simple <literal>%</literal>-specifier expansion is supported, see below for a list of supported
358 specifiers.</para>
359 </listitem>
3a6ce677
BR
360 </varlistentry>
361
e735f4d4
MP
362 <varlistentry>
363 <term><varname>DefaultCPUAccounting=</varname></term>
364 <term><varname>DefaultBlockIOAccounting=</varname></term>
365 <term><varname>DefaultMemoryAccounting=</varname></term>
6300502b 366 <term><varname>DefaultTasksAccounting=</varname></term>
6e866b33 367 <term><varname>DefaultIOAccounting=</varname></term>
f5e65279 368 <term><varname>DefaultIPAccounting=</varname></term>
e735f4d4 369
f5e65279
MB
370 <listitem><para>Configure the default resource accounting settings, as configured per-unit by
371 <varname>CPUAccounting=</varname>, <varname>BlockIOAccounting=</varname>, <varname>MemoryAccounting=</varname>,
6e866b33 372 <varname>TasksAccounting=</varname>, <varname>IOAccounting=</varname> and <varname>IPAccounting=</varname>. See
e735f4d4 373 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
6e866b33
MB
374 for details on the per-unit settings. <varname>DefaultTasksAccounting=</varname> defaults to yes,
375 <varname>DefaultMemoryAccounting=</varname> to &MEMORY_ACCOUNTING_DEFAULT;. <varname>DefaultCPUAccounting=</varname>
376 defaults to yes if enabling CPU accounting doesn't require the CPU controller to be enabled (Linux 4.15+ using the
377 unified hierarchy for resource control), otherwise it defaults to no. The other three settings default to no.</para></listitem>
db2df898
MP
378 </varlistentry>
379
380 <varlistentry>
381 <term><varname>DefaultTasksMax=</varname></term>
382
5a920b42 383 <listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
db2df898 384 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
5a920b42 385 for details. This setting applies to all unit types that support resource control settings, with the exception
1ce460ce
MB
386 of slice units. Defaults to 15% of the minimum of <varname>kernel.pid_max=</varname>, <varname>kernel.threads-max=</varname>
387 and root cgroup <varname>pids.max</varname>.
9e294e28
MB
388 Kernel has a default value for <varname>kernel.pid_max=</varname> and an algorithm of counting in case of more than 32 cores.
389 For example with the default <varname>kernel.pid_max=</varname>, <varname>DefaultTasksMax=</varname> defaults to 4915,
390 but might be greater in other systems or smaller in OS containers.</para></listitem>
e735f4d4
MP
391 </varlistentry>
392
393 <varlistentry>
394 <term><varname>DefaultLimitCPU=</varname></term>
395 <term><varname>DefaultLimitFSIZE=</varname></term>
396 <term><varname>DefaultLimitDATA=</varname></term>
397 <term><varname>DefaultLimitSTACK=</varname></term>
398 <term><varname>DefaultLimitCORE=</varname></term>
399 <term><varname>DefaultLimitRSS=</varname></term>
400 <term><varname>DefaultLimitNOFILE=</varname></term>
401 <term><varname>DefaultLimitAS=</varname></term>
402 <term><varname>DefaultLimitNPROC=</varname></term>
403 <term><varname>DefaultLimitMEMLOCK=</varname></term>
404 <term><varname>DefaultLimitLOCKS=</varname></term>
405 <term><varname>DefaultLimitSIGPENDING=</varname></term>
406 <term><varname>DefaultLimitMSGQUEUE=</varname></term>
407 <term><varname>DefaultLimitNICE=</varname></term>
408 <term><varname>DefaultLimitRTPRIO=</varname></term>
409 <term><varname>DefaultLimitRTTIME=</varname></term>
410
46cdbd49
BR
411 <listitem><para>These settings control various default resource limits for processes executed by
412 units. See
413 <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry> for
414 details. These settings may be overridden in individual units using the corresponding
a10f5d05
MB
415 <varname>LimitXXX=</varname> directives and they accept the same parameter syntax,
416 see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
417 for details. Note that these resource limits are only defaults
8b3d4ff0
MB
418 for units, they are not applied to the service manager process (i.e. PID 1) itself.</para>
419
420 <para>Most of these settings are unset, which means the resource limits are inherited from the kernel or, if
421 invoked in a container, from the container manager. However, the following have defaults:</para>
422 <itemizedlist>
423 <listitem><para><varname>DefaultLimitNOFILE=</varname> defaults to <literal>1024:&HIGH_RLIMIT_NOFILE;</literal>.
424 </para></listitem>
425
426 <listitem><para><varname>DefaultLimitCORE=</varname> does not have a default but it is worth mentioning that
427 <varname>RLIMIT_CORE</varname> is set to <literal>infinity</literal> by PID 1 which is inherited by its
428 children.</para></listitem>
429
430 <listitem><para>Note that the service manager internally increases <varname>RLIMIT_MEMLOCK</varname> for
431 itself, however the limit is reverted to the original value for child processes forked off.</para></listitem>
432 </itemizedlist>
433
434 </listitem>
e735f4d4 435 </varlistentry>
f2dec872
BR
436
437 <varlistentry>
438 <term><varname>DefaultOOMPolicy=</varname></term>
439
440 <listitem><para>Configure the default policy for reacting to processes being killed by the Linux
441 Out-Of-Memory (OOM) killer. This may be used to pick a global default for the per-unit
442 <varname>OOMPolicy=</varname> setting. See
443 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
444 for details. Note that this default is not used for services that have <varname>Delegate=</varname>
445 turned on.</para></listitem>
446 </varlistentry>
e735f4d4
MP
447 </variablelist>
448 </refsect1>
449
8b3d4ff0
MB
450 <refsect1>
451 <title>Specifiers</title>
452
453 <para>Specifiers may be used in the <varname>DefaultEnvironment=</varname> and
454 <varname>ManagerEnvironment=</varname> settings. The following expansions are understood:</para>
455 <table class='specifiers'>
456 <title>Specifiers available</title>
457 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
458 <colspec colname="spec" />
459 <colspec colname="mean" />
460 <colspec colname="detail" />
461 <thead>
462 <row>
463 <entry>Specifier</entry>
464 <entry>Meaning</entry>
465 <entry>Details</entry>
466 </row>
467 </thead>
468 <tbody>
469 <xi:include href="standard-specifiers.xml" xpointer="a"/>
470 <xi:include href="standard-specifiers.xml" xpointer="A"/>
471 <xi:include href="standard-specifiers.xml" xpointer="b"/>
472 <xi:include href="standard-specifiers.xml" xpointer="B"/>
473 <xi:include href="standard-specifiers.xml" xpointer="H"/>
474 <xi:include href="standard-specifiers.xml" xpointer="l"/>
475 <xi:include href="standard-specifiers.xml" xpointer="m"/>
476 <xi:include href="standard-specifiers.xml" xpointer="M"/>
477 <xi:include href="standard-specifiers.xml" xpointer="o"/>
478 <xi:include href="standard-specifiers.xml" xpointer="v"/>
479 <xi:include href="standard-specifiers.xml" xpointer="w"/>
480 <xi:include href="standard-specifiers.xml" xpointer="W"/>
481 <xi:include href="standard-specifiers.xml" xpointer="T"/>
482 <xi:include href="standard-specifiers.xml" xpointer="V"/>
483 <xi:include href="standard-specifiers.xml" xpointer="percent"/>
484 </tbody>
485 </tgroup>
486 </table>
487 </refsect1>
488
e735f4d4
MP
489 <refsect1>
490 <title>See Also</title>
491 <para>
492 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
493 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
494 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
495 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
496 <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
497 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
498 </para>
499 </refsect1>
663996b3
MS
500
501</refentry>