1SYSTEMD-SYSTEM.CONF(5)        systemd-system.conf       SYSTEMD-SYSTEM.CONF(5)
2
3
4

NAME

6       systemd-system.conf, system.conf.d, systemd-user.conf, user.conf.d -
7       System and session service manager configuration files
8

SYNOPSIS

10       /etc/systemd/system.conf, /etc/systemd/system.conf.d/*.conf,
11       /run/systemd/system.conf.d/*.conf,
12       /usr/lib/systemd/system.conf.d/*.conf
13
14       ~/.config/systemd/user.conf, /etc/systemd/user.conf,
15       /etc/systemd/user.conf.d/*.conf, /run/systemd/user.conf.d/*.conf,
16       /usr/lib/systemd/user.conf.d/*.conf
17

DESCRIPTION

19       When run as a system instance, systemd interprets the configuration
20       file system.conf and the files in system.conf.d directories; when run
21       as a user instance, it interprets the configuration file user.conf
22       (either in the home directory of the user, or if not found, under
23       /etc/systemd/) and the files in user.conf.d directories. These
24       configuration files contain a few settings controlling basic manager
25       operations.
26
27       See systemd.syntax(7) for a general description of the syntax.
28

CONFIGURATION DIRECTORIES AND PRECEDENCE

30       The default configuration is set during compilation, so configuration
31       is only needed when it is necessary to deviate from those defaults.
32       Initially, the main configuration file in /etc/systemd/ contains
33       commented out entries showing the defaults as a guide to the
34       administrator. Local overrides can be created by editing this file or
35       by creating drop-ins, as described below. Using drop-ins for local
36       configuration is recommended over modifications to the main
37       configuration file.
38
39       In addition to the "main" configuration file, drop-in configuration
40       snippets are read from /usr/lib/systemd/*.conf.d/,
41       /usr/local/lib/systemd/*.conf.d/, and /etc/systemd/*.conf.d/. Those
42       drop-ins have higher precedence and override the main configuration
43       file. Files in the *.conf.d/ configuration subdirectories are sorted by
44       their filename in lexicographic order, regardless of in which of the
45       subdirectories they reside. When multiple files specify the same
46       option, for options which accept just a single value, the entry in the
47       file sorted last takes precedence, and for options which accept a list
48       of values, entries are collected as they occur in the sorted files.
49
50       When packages need to customize the configuration, they can install
51       drop-ins under /usr/. Files in /etc/ are reserved for the local
52       administrator, who may use this logic to override the configuration
53       files installed by vendor packages. Drop-ins have to be used to
54       override package drop-ins, since the main configuration file has lower
55       precedence. It is recommended to prefix all filenames in those
56       subdirectories with a two-digit number and a dash, to simplify the
57       ordering of the files.
58
59       To disable a configuration file supplied by the vendor, the recommended
60       way is to place a symlink to /dev/null in the configuration directory
61       in /etc/, with the same filename as the vendor configuration file.
62

OPTIONS

64       All options are configured in the [Manager] section:
65
66       LogColor=, LogLevel=, LogLocation=, LogTarget=, LogTime=, DumpCore=yes,
67       CrashChangeVT=no, CrashShell=no, CrashReboot=no, ShowStatus=yes,
68       DefaultStandardOutput=journal, DefaultStandardError=inherit
69           Configures various parameters of basic manager operation. These
70           options may be overridden by the respective process and kernel
71           command line arguments. See systemd(1) for details.
72
73       CtrlAltDelBurstAction=
74           Defines what action will be performed if user presses
75           Ctrl-Alt-Delete more than 7 times in 2s. Can be set to
76           "reboot-force", "poweroff-force", "reboot-immediate",
77           "poweroff-immediate" or disabled with "none". Defaults to
78           "reboot-force".
79
80       CPUAffinity=
81           Configures the CPU affinity for the service manager as well as the
82           default CPU affinity for all forked off processes. Takes a list of
83           CPU indices or ranges separated by either whitespace or commas. CPU
84           ranges are specified by the lower and upper CPU indices separated
85           by a dash. This option may be specified more than once, in which
86           case the specified CPU affinity masks are merged. If the empty
87           string is assigned, the mask is reset, all assignments prior to
88           this will have no effect. Individual services may override the CPU
89           affinity for their processes with the CPUAffinity= setting in unit
90           files, see systemd.exec(5).
91
92       NUMAPolicy=
93           Configures the NUMA memory policy for the service manager and the
94           default NUMA memory policy for all forked off processes. Individual
95           services may override the default policy with the NUMAPolicy=
96           setting in unit files, see systemd.exec(5).
97
98       NUMAMask=
99           Configures the NUMA node mask that will be associated with the
100           selected NUMA policy. Note that default and local NUMA policies
101           don't require explicit NUMA node mask and value of the option can
102           be empty. Similarly to NUMAPolicy=, value can be overridden by
103           individual services in unit files, see systemd.exec(5).
104
105       RuntimeWatchdogSec=, RebootWatchdogSec=, KExecWatchdogSec=
106           Configure the hardware watchdog at runtime and at reboot. Takes a
107           timeout value in seconds (or in other time units if suffixed with
108           "ms", "min", "h", "d", "w"). If RuntimeWatchdogSec= is set to a
109           non-zero value, the watchdog hardware (/dev/watchdog or the path
110           specified with WatchdogDevice= or the kernel option
111           systemd.watchdog-device=) will be programmed to automatically
112           reboot the system if it is not contacted within the specified
113           timeout interval. The system manager will ensure to contact it at
114           least once in half the specified timeout interval. This feature
115           requires a hardware watchdog device to be present, as it is
116           commonly the case in embedded and server systems. Not all hardware
117           watchdogs allow configuration of all possible reboot timeout
118           values, in which case the closest available timeout is picked.
119           RebootWatchdogSec= may be used to configure the hardware watchdog
120           when the system is asked to reboot. It works as a safety net to
121           ensure that the reboot takes place even if a clean reboot attempt
122           times out. Note that the RebootWatchdogSec= timeout applies only to
123           the second phase of the reboot, i.e. after all regular services are
124           already terminated, and after the system and service manager
125           process (PID 1) got replaced by the systemd-shutdown binary, see
126           system bootup(7) for details. During the first phase of the
127           shutdown operation the system and service manager remains running
128           and hence RuntimeWatchdogSec= is still honoured. In order to define
129           a timeout on this first phase of system shutdown, configure
130           JobTimeoutSec= and JobTimeoutAction= in the [Unit] section of the
131           shutdown.target unit. By default RuntimeWatchdogSec= defaults to 0
132           (off), and RebootWatchdogSec= to 10min.  KExecWatchdogSec= may be
133           used to additionally enable the watchdog when kexec is being
134           executed rather than when rebooting. Note that if the kernel does
135           not reset the watchdog on kexec (depending on the specific hardware
136           and/or driver), in this case the watchdog might not get disabled
137           after kexec succeeds and thus the system might get rebooted, unless
138           RuntimeWatchdogSec= is also enabled at the same time. For this
139           reason it is recommended to enable KExecWatchdogSec= only if
140           RuntimeWatchdogSec= is also enabled. These settings have no effect
141           if a hardware watchdog is not available.
142
143       WatchdogDevice=
144           Configure the hardware watchdog device that the runtime and
145           shutdown watchdog timers will open and use. Defaults to
146           /dev/watchdog. This setting has no effect if a hardware watchdog is
147           not available.
148
149       CapabilityBoundingSet=
150           Controls which capabilities to include in the capability bounding
151           set for PID 1 and its children. See capabilities(7) for details.
152           Takes a whitespace-separated list of capability names as read by
153           cap_from_name(3). Capabilities listed will be included in the
154           bounding set, all others are removed. If the list of capabilities
155           is prefixed with ~, all but the listed capabilities will be
156           included, the effect of the assignment inverted. Note that this
157           option also affects the respective capabilities in the effective,
158           permitted and inheritable capability sets. The capability bounding
159           set may also be individually configured for units using the
160           CapabilityBoundingSet= directive for units, but note that
161           capabilities dropped for PID 1 cannot be regained in individual
162           units, they are lost for good.
163
164       NoNewPrivileges=
165           Takes a boolean argument. If true, ensures that PID 1 and all its
166           children can never gain new privileges through execve(2) (e.g. via
167           setuid or setgid bits, or filesystem capabilities). Defaults to
168           false. General purpose distributions commonly rely on executables
169           with setuid or setgid bits and will thus not function properly with
170           this option enabled. Individual units cannot disable this option.
171           Also see No New Privileges Flag[1].
172
173       SystemCallArchitectures=
174           Takes a space-separated list of architecture identifiers. Selects
175           from which architectures system calls may be invoked on this
176           system. This may be used as an effective way to disable invocation
177           of non-native binaries system-wide, for example to prohibit
178           execution of 32-bit x86 binaries on 64-bit x86-64 systems. This
179           option operates system-wide, and acts similar to the
180           SystemCallArchitectures= setting of unit files, see systemd.exec(5)
181           for details. This setting defaults to the empty list, in which case
182           no filtering of system calls based on architecture is applied.
183           Known architecture identifiers are "x86", "x86-64", "x32", "arm"
184           and the special identifier "native". The latter implicitly maps to
185           the native architecture of the system (or more specifically, the
186           architecture the system manager was compiled for). Set this setting
187           to "native" to prohibit execution of any non-native binaries. When
188           a binary executes a system call of an architecture that is not
189           listed in this setting, it will be immediately terminated with the
190           SIGSYS signal.
191
192       TimerSlackNSec=
193           Sets the timer slack in nanoseconds for PID 1, which is inherited
194           by all executed processes, unless overridden individually, for
195           example with the TimerSlackNSec= setting in service units (for
196           details see systemd.exec(5)). The timer slack controls the accuracy
197           of wake-ups triggered by system timers. See prctl(2) for more
198           information. Note that in contrast to most other time span
199           definitions this parameter takes an integer value in nano-seconds
200           if no unit is specified. The usual time units are understood too.
201
202       StatusUnitFormat=
203           Takes name, description or combined as the value. If name, the
204           system manager will use unit names in status messages (e.g.
205           "systemd-journald.service"), instead of the longer and more
206           informative descriptions set with Description= (e.g.  "Journal
207           Logging Service"). If combined, the system manager will use both
208           unit names and descriptions in status messages (e.g.
209           "systemd-journald.service - Journal Logging Service").
210
211           See systemd.unit(5) for details about unit names and Description=.
212
213       DefaultTimerAccuracySec=
214           Sets the default accuracy of timer units. This controls the global
215           default for the AccuracySec= setting of timer units, see
216           systemd.timer(5) for details.  AccuracySec= set in individual units
217           override the global default for the specific unit. Defaults to
218           1min. Note that the accuracy of timer units is also affected by the
219           configured timer slack for PID 1, see TimerSlackNSec= above.
220
221       DefaultTimeoutStartSec=, DefaultTimeoutStopSec=,
222       DefaultTimeoutAbortSec=, DefaultRestartSec=
223           Configures the default timeouts for starting, stopping and aborting
224           of units, as well as the default time to sleep between automatic
225           restarts of units, as configured per-unit in TimeoutStartSec=,
226           TimeoutStopSec=, TimeoutAbortSec= and RestartSec= (for services,
227           see systemd.service(5) for details on the per-unit settings).
228           Disabled by default, when service with Type=oneshot is used. For
229           non-service units, DefaultTimeoutStartSec= sets the default
230           TimeoutSec= value.  DefaultTimeoutStartSec= and
231           DefaultTimeoutStopSec= default to 90s.  DefaultTimeoutAbortSec= is
232           not set by default so that all units fall back to TimeoutStopSec=.
233           DefaultRestartSec= defaults to 100ms.
234
235       DefaultStartLimitIntervalSec=, DefaultStartLimitBurst=
236           Configure the default unit start rate limiting, as configured
237           per-service by StartLimitIntervalSec= and StartLimitBurst=. See
238           systemd.service(5) for details on the per-service settings.
239           DefaultStartLimitIntervalSec= defaults to 10s.
240           DefaultStartLimitBurst= defaults to 5.
241
242       DefaultEnvironment=
243           Configures environment variables passed to all executed processes.
244           Takes a space-separated list of variable assignments. See
245           environ(7) for details about environment variables.
246
247           Simple "%"-specifier expansion is supported, see below for a list
248           of supported specifiers.
249
250           Example:
251
252               DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"
253
254           Sets three variables "VAR1", "VAR2", "VAR3".
255
256       ManagerEnvironment=
257           Takes the same arguments as DefaultEnvironment=, see above. Sets
258           environment variables just for the manager process itself. In
259           contrast to user managers, these variables are not inherited by
260           processes spawned by the system manager, use DefaultEnvironment=
261           for that. Note that these variables are merged into the existing
262           environment block. In particular, in case of the system manager,
263           this includes variables set by the kernel based on the kernel
264           command line.
265
266           Setting environment variables for the manager process may be useful
267           to modify its behaviour. See ENVIRONMENT[2] for a descriptions of
268           some variables understood by systemd.
269
270           Simple "%"-specifier expansion is supported, see below for a list
271           of supported specifiers.
272
273       DefaultCPUAccounting=, DefaultBlockIOAccounting=,
274       DefaultMemoryAccounting=, DefaultTasksAccounting=,
275       DefaultIOAccounting=, DefaultIPAccounting=
276           Configure the default resource accounting settings, as configured
277           per-unit by CPUAccounting=, BlockIOAccounting=, MemoryAccounting=,
278           TasksAccounting=, IOAccounting= and IPAccounting=. See
279           systemd.resource-control(5) for details on the per-unit settings.
280           DefaultTasksAccounting= defaults to yes, DefaultMemoryAccounting=
281           to yes.  DefaultCPUAccounting= defaults to yes if enabling CPU
282           accounting doesn't require the CPU controller to be enabled (Linux
283           4.15+ using the unified hierarchy for resource control), otherwise
284           it defaults to no. The other three settings default to no.
285
286       DefaultTasksMax=
287           Configure the default value for the per-unit TasksMax= setting. See
288           systemd.resource-control(5) for details. This setting applies to
289           all unit types that support resource control settings, with the
290           exception of slice units. Defaults to 15% of the minimum of
291           kernel.pid_max=, kernel.threads-max= and root cgroup pids.max.
292           Kernel has a default value for kernel.pid_max= and an algorithm of
293           counting in case of more than 32 cores. For example with the
294           default kernel.pid_max=, DefaultTasksMax= defaults to 4915, but
295           might be greater in other systems or smaller in OS containers.
296
297       DefaultLimitCPU=, DefaultLimitFSIZE=, DefaultLimitDATA=,
298       DefaultLimitSTACK=, DefaultLimitCORE=, DefaultLimitRSS=,
299       DefaultLimitNOFILE=, DefaultLimitAS=, DefaultLimitNPROC=,
300       DefaultLimitMEMLOCK=, DefaultLimitLOCKS=, DefaultLimitSIGPENDING=,
301       DefaultLimitMSGQUEUE=, DefaultLimitNICE=, DefaultLimitRTPRIO=,
302       DefaultLimitRTTIME=
303           These settings control various default resource limits for
304           processes executed by units. See setrlimit(2) for details. These
305           settings may be overridden in individual units using the
306           corresponding LimitXXX= directives and they accept the same
307           parameter syntax, see systemd.exec(5) for details. Note that these
308           resource limits are only defaults for units, they are not applied
309           to the service manager process (i.e. PID 1) itself.
310
311           Most of these settings are unset, which means the resource limits
312           are inherited from the kernel or, if invoked in a container, from
313           the container manager. However, the following have defaults:
314
315DefaultLimitNOFILE= defaults to "1024:524288".
316
317DefaultLimitCORE= does not have a default but it is worth
318               mentioning that RLIMIT_CORE is set to "infinity" by PID 1 which
319               is inherited by its children.
320
321           •   Note that the service manager internally increases
322               RLIMIT_MEMLOCK for itself, however the limit is reverted to the
323               original value for child processes forked off.
324
325       DefaultOOMPolicy=
326           Configure the default policy for reacting to processes being killed
327           by the Linux Out-Of-Memory (OOM) killer. This may be used to pick a
328           global default for the per-unit OOMPolicy= setting. See
329           systemd.service(5) for details. Note that this default is not used
330           for services that have Delegate= turned on.
331

SPECIFIERS

333       Specifiers may be used in the DefaultEnvironment= and
334       ManagerEnvironment= settings. The following expansions are understood:
335
336       Table 1. Specifiers available
337       ┌──────────┬─────────────────────┬────────────────────────┐
338Specifier Meaning             Details                
339       ├──────────┼─────────────────────┼────────────────────────┤
340       │"%a"      │ Architecture        │ A short string         │
341       │          │                     │ identifying the        │
342       │          │                     │ architecture of the    │
343       │          │                     │ local system. A        │
344       │          │                     │ string such as x86,    │
345       │          │                     │ x86-64 or arm64.       │
346       │          │                     │ See the                │
347       │          │                     │ architectures          │
348       │          │                     │ defined for            │
349       │          │                     │ ConditionArchitecture=
350       │          │                     │ in systemd.unit(5)
351       │          │                     │ for a full list.       │
352       ├──────────┼─────────────────────┼────────────────────────┤
353       │"%A"      │ Operating system    │ The operating system   │
354       │          │ image version       │ image version          │
355       │          │                     │ identifier of the      │
356       │          │                     │ running system, as     │
357       │          │                     │ read from the          │
358       │          │                     │ IMAGE_VERSION= field   │
359       │          │                     │ of /etc/os-release. If │
360       │          │                     │ not set, resolves to   │
361       │          │                     │ an empty string. See   │
362       │          │                     │ os-release(5) for more │
363       │          │                     │ information.           │
364       ├──────────┼─────────────────────┼────────────────────────┤
365       │"%b"      │ Boot ID             │ The boot ID of the     │
366       │          │                     │ running system,        │
367       │          │                     │ formatted as string.   │
368       │          │                     │ See random(4) for more │
369       │          │                     │ information.           │
370       ├──────────┼─────────────────────┼────────────────────────┤
371       │"%B"      │ Operating system    │ The operating system   │
372       │          │ build ID            │ build identifier of    │
373       │          │                     │ the running system, as │
374       │          │                     │ read from the          │
375       │          │                     │ BUILD_ID= field of     │
376       │          │                     │ /etc/os-release. If    │
377       │          │                     │ not set, resolves to   │
378       │          │                     │ an empty string. See   │
379       │          │                     │ os-release(5) for more │
380       │          │                     │ information.           │
381       ├──────────┼─────────────────────┼────────────────────────┤
382       │"%H"      │ Host name           │ The hostname of the    │
383       │          │                     │ running system.        │
384       ├──────────┼─────────────────────┼────────────────────────┤
385       │"%l"      │ Short host name     │ The hostname of the    │
386       │          │                     │ running system,        │
387       │          │                     │ truncated at the first │
388       │          │                     │ dot to remove any      │
389       │          │                     │ domain component.      │
390       ├──────────┼─────────────────────┼────────────────────────┤
391       │"%m"      │ Machine ID          │ The machine ID of the  │
392       │          │                     │ running system,        │
393       │          │                     │ formatted as string.   │
394       │          │                     │ See machine-id(5) for  │
395       │          │                     │ more information.      │
396       ├──────────┼─────────────────────┼────────────────────────┤
397       │"%M"      │ Operating system    │ The operating system   │
398       │          │ image identifier    │ image identifier of    │
399       │          │                     │ the running system, as │
400       │          │                     │ read from the          │
401       │          │                     │ IMAGE_ID= field of     │
402       │          │                     │ /etc/os-release. If    │
403       │          │                     │ not set, resolves to   │
404       │          │                     │ an empty string. See   │
405       │          │                     │ os-release(5) for more │
406       │          │                     │ information.           │
407       ├──────────┼─────────────────────┼────────────────────────┤
408       │"%o"      │ Operating system ID │ The operating system   │
409       │          │                     │ identifier of the      │
410       │          │                     │ running system, as     │
411       │          │                     │ read from the ID=
412       │          │                     │ field of               │
413       │          │                     │ /etc/os-release. See   │
414       │          │                     │ os-release(5) for more │
415       │          │                     │ information.           │
416       ├──────────┼─────────────────────┼────────────────────────┤
417       │"%v"      │ Kernel release      │ Identical to uname -r  
418       │          │                     │ output.                │
419       ├──────────┼─────────────────────┼────────────────────────┤
420       │"%w"      │ Operating system    │ The operating system   │
421       │          │ version ID          │ version identifier of  │
422       │          │                     │ the running system, as │
423       │          │                     │ read from the          │
424       │          │                     │ VERSION_ID= field of   │
425       │          │                     │ /etc/os-release. If    │
426       │          │                     │ not set, resolves to   │
427       │          │                     │ an empty string. See   │
428       │          │                     │ os-release(5) for more │
429       │          │                     │ information.           │
430       ├──────────┼─────────────────────┼────────────────────────┤
431       │"%W"      │ Operating system    │ The operating system   │
432       │          │ variant ID          │ variant identifier of  │
433       │          │                     │ the running system, as │
434       │          │                     │ read from the          │
435       │          │                     │ VARIANT_ID= field of   │
436       │          │                     │ /etc/os-release. If    │
437       │          │                     │ not set, resolves to   │
438       │          │                     │ an empty string. See   │
439       │          │                     │ os-release(5) for more │
440       │          │                     │ information.           │
441       ├──────────┼─────────────────────┼────────────────────────┤
442       │"%T"      │ Directory for       │ This is either /tmp or │
443       │          │ temporary files     │ the path "$TMPDIR",    │
444       │          │                     │ "$TEMP" or "$TMP" are  │
445       │          │                     │ set to. (Note that the │
446       │          │                     │ directory may be       │
447       │          │                     │ specified without a    │
448       │          │                     │ trailing slash.)       │
449       ├──────────┼─────────────────────┼────────────────────────┤
450       │"%V"      │ Directory for       │ This is either         │
451       │          │ larger and          │ /var/tmp or the path   │
452       │          │ persistent          │ "$TMPDIR", "$TEMP" or  │
453       │          │ temporary files     │ "$TMP" are set to.     │
454       │          │                     │ (Note that the         │
455       │          │                     │ directory may be       │
456       │          │                     │ specified without a    │
457       │          │                     │ trailing slash.)       │
458       ├──────────┼─────────────────────┼────────────────────────┤
459       │"%%"      │ Single percent sign │ Use "%%" in place of   │
460       │          │                     │ "%" to specify a       │
461       │          │                     │ single percent sign.   │
462       └──────────┴─────────────────────┴────────────────────────┘
463

SEE ALSO

465       systemd(1), systemd.directives(7), systemd.exec(5), systemd.service(5),
466       environ(7), capabilities(7)
467

NOTES

469        1. No New Privileges Flag
470           https://www.kernel.org/doc/html/latest/userspace-api/no_new_privs.html
471
472        2. ENVIRONMENT
473           https://systemd.io/ENVIRONMENT
474
475
476
477systemd 249                                             SYSTEMD-SYSTEM.CONF(5)
Impressum