1SYSTEMD-SYSTEM.CONF(5) systemd-system.conf SYSTEMD-SYSTEM.CONF(5)
2
3
4
6 systemd-system.conf, system.conf.d, systemd-user.conf, user.conf.d -
7 System and session service manager configuration files
8
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
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
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
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 either name or description as the value. If name, the system
204 manager will use unit names in status messages, instead of the
205 longer and more informative descriptions set with Description=, see
206 systemd.unit(5).
207
208 DefaultTimerAccuracySec=
209 Sets the default accuracy of timer units. This controls the global
210 default for the AccuracySec= setting of timer units, see
211 systemd.timer(5) for details. AccuracySec= set in individual units
212 override the global default for the specific unit. Defaults to
213 1min. Note that the accuracy of timer units is also affected by the
214 configured timer slack for PID 1, see TimerSlackNSec= above.
215
216 DefaultTimeoutStartSec=, DefaultTimeoutStopSec=,
217 DefaultTimeoutAbortSec=, DefaultRestartSec=
218 Configures the default timeouts for starting, stopping and aborting
219 of units, as well as the default time to sleep between automatic
220 restarts of units, as configured per-unit in TimeoutStartSec=,
221 TimeoutStopSec=, TimeoutAbortSec= and RestartSec= (for services,
222 see systemd.service(5) for details on the per-unit settings).
223 Disabled by default, when service with Type=oneshot is used. For
224 non-service units, DefaultTimeoutStartSec= sets the default
225 TimeoutSec= value. DefaultTimeoutStartSec= and
226 DefaultTimeoutStopSec= default to 90s. DefaultTimeoutAbortSec= is
227 not set by default so that all units fall back to TimeoutStopSec=.
228 DefaultRestartSec= defaults to 100ms.
229
230 DefaultStartLimitIntervalSec=, DefaultStartLimitBurst=
231 Configure the default unit start rate limiting, as configured
232 per-service by StartLimitIntervalSec= and StartLimitBurst=. See
233 systemd.service(5) for details on the per-service settings.
234 DefaultStartLimitIntervalSec= defaults to 10s.
235 DefaultStartLimitBurst= defaults to 5.
236
237 DefaultEnvironment=
238 Configures environment variables passed to all executed processes.
239 Takes a space-separated list of variable assignments. See
240 environ(7) for details about environment variables.
241
242 Example:
243
244 DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"
245
246 Sets three variables "VAR1", "VAR2", "VAR3".
247
248 ManagerEnvironment=
249 Takes the same arguments as DefaultEnvironment=, see above. Sets
250 environment variables just for the manager process itself. These
251 variables are not inherited by processes spawned by the service
252 manager, use DefaultEnvironment= for that. Note that these
253 variables are merged into the existing environment block. In
254 particular, in case of the system manager, this includes variables
255 set by the kernel based on the kernel command line.
256
257 Setting environment variables for the manager process may be useful
258 to modify its behaviour. See ENVIRONMENT[2] for a descriptions of
259 some variables understood by systemd.
260
261 DefaultCPUAccounting=, DefaultBlockIOAccounting=,
262 DefaultMemoryAccounting=, DefaultTasksAccounting=,
263 DefaultIOAccounting=, DefaultIPAccounting=
264 Configure the default resource accounting settings, as configured
265 per-unit by CPUAccounting=, BlockIOAccounting=, MemoryAccounting=,
266 TasksAccounting=, IOAccounting= and IPAccounting=. See
267 systemd.resource-control(5) for details on the per-unit settings.
268 DefaultTasksAccounting= defaults to yes, DefaultMemoryAccounting=
269 to yes. DefaultCPUAccounting= defaults to yes if enabling CPU
270 accounting doesn't require the CPU controller to be enabled (Linux
271 4.15+ using the unified hierarchy for resource control), otherwise
272 it defaults to no. The other three settings default to no.
273
274 DefaultTasksMax=
275 Configure the default value for the per-unit TasksMax= setting. See
276 systemd.resource-control(5) for details. This setting applies to
277 all unit types that support resource control settings, with the
278 exception of slice units. Defaults to 15% of the minimum of
279 kernel.pid_max=, kernel.threads-max= and root cgroup pids.max.
280 Kernel has a default value for kernel.pid_max= and an algorithm of
281 counting in case of more than 32 cores. For example with the
282 default kernel.pid_max=, DefaultTasksMax= defaults to 4915, but
283 might be greater in other systems or smaller in OS containers.
284
285 DefaultLimitCPU=, DefaultLimitFSIZE=, DefaultLimitDATA=,
286 DefaultLimitSTACK=, DefaultLimitCORE=, DefaultLimitRSS=,
287 DefaultLimitNOFILE=, DefaultLimitAS=, DefaultLimitNPROC=,
288 DefaultLimitMEMLOCK=, DefaultLimitLOCKS=, DefaultLimitSIGPENDING=,
289 DefaultLimitMSGQUEUE=, DefaultLimitNICE=, DefaultLimitRTPRIO=,
290 DefaultLimitRTTIME=
291 These settings control various default resource limits for
292 processes executed by units. See setrlimit(2) for details. These
293 settings may be overridden in individual units using the
294 corresponding LimitXXX= directives and they accept the same
295 parameter syntax, see systemd.exec(5) for details. Note that these
296 resource limits are only defaults for units, they are not applied
297 to the service manager process (i.e. PID 1) itself.
298
299 DefaultOOMPolicy=
300 Configure the default policy for reacting to processes being killed
301 by the Linux Out-Of-Memory (OOM) killer. This may be used to pick a
302 global default for the per-unit OOMPolicy= setting. See
303 systemd.service(5) for details. Note that this default is not used
304 for services that have Delegate= turned on.
305
307 systemd(1), systemd.directives(7), systemd.exec(5), systemd.service(5),
308 environ(7), capabilities(7)
309
311 1. No New Privileges Flag
312 https://www.kernel.org/doc/html/latest/userspace-api/no_new_privs.html
313
314 2. ENVIRONMENT
315 https://systemd.io/ENVIRONMENT
316
317
318
319systemd 248 SYSTEMD-SYSTEM.CONF(5)