1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd-system.conf"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
27 <title>systemd-system.conf</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd-system.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>systemd-system.conf</refname>
47 <refname>system.conf.d</refname>
48 <refname>systemd-user.conf</refname>
49 <refname>user.conf.d</refname>
50 <refpurpose>System and session service manager configuration files</refpurpose>
54 <para><filename>/etc/systemd/system.conf</filename></para>
55 <para><filename>/etc/systemd/system.conf.d/*.conf</filename></para>
56 <para><filename>/run/systemd/system.conf.d/*.conf</filename></para>
57 <para><filename>/usr/lib/systemd/system.conf.d/*.conf</filename></para>
58 <para><filename>/etc/systemd/user.conf</filename></para>
59 <para><filename>/etc/systemd/user.conf.d/*.conf</filename></para>
60 <para><filename>/run/systemd/user.conf.d/*.conf</filename></para>
61 <para><filename>/usr/lib/systemd/user.conf.d/*.conf</filename></para>
65 <title>Description</title>
67 <para>When run as a system instance, systemd interprets the
68 configuration file <filename>system.conf</filename> and the files
69 in <filename>system.conf.d</filename> directories; when run as a
70 user instance, systemd interprets the configuration file
71 <filename>user.conf</filename> and the files in
72 <filename>user.conf.d</filename> directories. These configuration
73 files contain a few settings controlling basic manager
77 <xi:include href="standard-conf.xml" xpointer="confd" />
78 <xi:include href="standard-conf.xml" xpointer="conf" />
81 <title>Options</title>
83 <para>All options are configured in the
84 <literal>[Manager]</literal> section:</para>
86 <variablelist class='systemd-directives'>
89 <term><varname>LogLevel=</varname></term>
90 <term><varname>LogTarget=</varname></term>
91 <term><varname>LogColor=</varname></term>
92 <term><varname>LogLocation=</varname></term>
93 <term><varname>DumpCore=yes</varname></term>
94 <term><varname>CrashShell=no</varname></term>
95 <term><varname>ShowStatus=yes</varname></term>
96 <term><varname>CrashChVT=1</varname></term>
97 <term><varname>DefaultStandardOutput=journal</varname></term>
98 <term><varname>DefaultStandardError=inherit</varname></term>
100 <listitem><para>Configures various parameters of basic manager
101 operation. These options may be overridden by the respective
102 command line arguments. See
103 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
104 for details about these command line
105 arguments.</para></listitem>
109 <term><varname>CPUAffinity=</varname></term>
111 <listitem><para>Configures the initial CPU affinity for the
112 init process. Takes a space-separated list of CPU
113 indices.</para></listitem>
117 <term><varname>JoinControllers=cpu,cpuacct net_cls,netprio</varname></term>
119 <listitem><para>Configures controllers that shall be mounted
120 in a single hierarchy. By default, systemd will mount all
121 controllers which are enabled in the kernel in individual
122 hierarchies, with the exception of those listed in this
123 setting. Takes a space-separated list of comma-separated
124 controller names, in order to allow multiple joined
125 hierarchies. Defaults to 'cpu,cpuacct'. Pass an empty string
126 to ensure that systemd mounts all controllers in separate
129 <para>Note that this option is only applied once, at very
130 early boot. If you use an initial RAM disk (initrd) that uses
131 systemd, it might hence be necessary to rebuild the initrd if
132 this option is changed, and make sure the new configuration
133 file is included in it. Otherwise, the initrd might mount the
134 controller hierarchies in a different configuration than
135 intended, and the main system cannot remount them
136 anymore.</para></listitem>
140 <term><varname>RuntimeWatchdogSec=</varname></term>
141 <term><varname>ShutdownWatchdogSec=</varname></term>
143 <listitem><para>Configure the hardware watchdog at runtime and
144 at reboot. Takes a timeout value in seconds (or in other time
145 units if suffixed with <literal>ms</literal>,
146 <literal>min</literal>, <literal>h</literal>,
147 <literal>d</literal>, <literal>w</literal>). If
148 <varname>RuntimeWatchdogSec=</varname> is set to a non-zero
149 value, the watchdog hardware
150 (<filename>/dev/watchdog</filename>) will be programmed to
151 automatically reboot the system if it is not contacted within
152 the specified timeout interval. The system manager will ensure
153 to contact it at least once in half the specified timeout
154 interval. This feature requires a hardware watchdog device to
155 be present, as it is commonly the case in embedded and server
156 systems. Not all hardware watchdogs allow configuration of the
157 reboot timeout, in which case the closest available timeout is
158 picked. <varname>ShutdownWatchdogSec=</varname> may be used to
159 configure the hardware watchdog when the system is asked to
160 reboot. It works as a safety net to ensure that the reboot
161 takes place even if a clean reboot attempt times out. By
162 default <varname>RuntimeWatchdogSec=</varname> defaults to 0
163 (off), and <varname>ShutdownWatchdogSec=</varname> to 10min.
164 These settings have no effect if a hardware watchdog is not
165 available.</para></listitem>
169 <term><varname>CapabilityBoundingSet=</varname></term>
171 <listitem><para>Controls which capabilities to include in the
172 capability bounding set for PID 1 and its children. See
173 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
174 for details. Takes a whitespace-separated list of capability
176 <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
177 Capabilities listed will be included in the bounding set, all
178 others are removed. If the list of capabilities is prefixed
179 with ~, all but the listed capabilities will be included, the
180 effect of the assignment inverted. Note that this option also
181 affects the respective capabilities in the effective,
182 permitted and inheritable capability sets. The capability
183 bounding set may also be individually configured for units
184 using the <varname>CapabilityBoundingSet=</varname> directive
185 for units, but note that capabilities dropped for PID 1 cannot
186 be regained in individual units, they are lost for
187 good.</para></listitem>
191 <term><varname>SystemCallArchitectures=</varname></term>
193 <listitem><para>Takes a space-separated list of architecture
194 identifiers. Selects from which architectures system calls may
195 be invoked on this system. This may be used as an effective
196 way to disable invocation of non-native binaries system-wide,
197 for example to prohibit execution of 32-bit x86 binaries on
198 64-bit x86-64 systems. This option operates system-wide, and
200 <varname>SystemCallArchitectures=</varname> setting of unit
202 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
203 for details. This setting defaults to the empty list, in which
204 case no filtering of system calls based on architecture is
205 applied. Known architecture identifiers are
206 <literal>x86</literal>, <literal>x86-64</literal>,
207 <literal>x32</literal>, <literal>arm</literal> and the special
208 identifier <literal>native</literal>. The latter implicitly
209 maps to the native architecture of the system (or more
210 specifically, the architecture the system manager was compiled
211 for). Set this setting to <literal>native</literal> to
212 prohibit execution of any non-native binaries. When a binary
213 executes a system call of an architecture that is not listed
214 in this setting, it will be immediately terminated with the
215 SIGSYS signal.</para></listitem>
219 <term><varname>TimerSlackNSec=</varname></term>
221 <listitem><para>Sets the timer slack in nanoseconds for PID 1,
222 which is inherited by all executed processes, unless
223 overridden individually, for example with the
224 <varname>TimerSlackNSec=</varname> setting in service units
226 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
227 The timer slack controls the accuracy of wake-ups triggered by
229 <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
230 for more information. Note that in contrast to most other time
231 span definitions this parameter takes an integer value in
232 nano-seconds if no unit is specified. The usual time units are
233 understood too.</para></listitem>
237 <term><varname>DefaultTimerAccuracySec=</varname></term>
239 <listitem><para>Sets the default accuracy of timer units. This
240 controls the global default for the
241 <varname>AccuracySec=</varname> setting of timer units, see
242 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
243 for details. <varname>AccuracySec=</varname> set in individual
244 units override the global default for the specific unit.
245 Defaults to 1min. Note that the accuracy of timer units is
246 also affected by the configured timer slack for PID 1, see
247 <varname>TimerSlackNSec=</varname> above.</para></listitem>
251 <term><varname>DefaultTimeoutStartSec=</varname></term>
252 <term><varname>DefaultTimeoutStopSec=</varname></term>
253 <term><varname>DefaultRestartSec=</varname></term>
255 <listitem><para>Configures the default timeouts for starting
256 and stopping of units, as well as the default time to sleep
257 between automatic restarts of units, as configured per-unit in
258 <varname>TimeoutStartSec=</varname>,
259 <varname>TimeoutStopSec=</varname> and
260 <varname>RestartSec=</varname> (for services, see
261 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
262 for details on the per-unit settings). For non-service units,
263 <varname>DefaultTimeoutStartSec=</varname> sets the default
264 <varname>TimeoutSec=</varname> value. </para></listitem>
268 <term><varname>DefaultStartLimitInterval=</varname></term>
269 <term><varname>DefaultStartLimitBurst=</varname></term>
271 <listitem><para>Configure the default unit start rate
272 limiting, as configured per-service by
273 <varname>StartLimitInterval=</varname> and
274 <varname>StartLimitBurst=</varname>. See
275 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
276 for details on the per-service settings.</para></listitem>
280 <term><varname>DefaultEnvironment=</varname></term>
282 <listitem><para>Sets manager environment variables passed to
283 all executed processes. Takes a space-separated list of
284 variable assignments. See
285 <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
286 for details about environment variables.</para>
290 <programlisting>DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
293 <literal>VAR1</literal>,
294 <literal>VAR2</literal>,
295 <literal>VAR3</literal>.</para></listitem>
299 <term><varname>DefaultCPUAccounting=</varname></term>
300 <term><varname>DefaultBlockIOAccounting=</varname></term>
301 <term><varname>DefaultMemoryAccounting=</varname></term>
303 <listitem><para>Configure the default resource accounting
304 settings, as configured per-unit by
305 <varname>CPUAccounting=</varname>,
306 <varname>BlockIOAccounting=</varname> and
307 <varname>MemoryAccounting=</varname>. See
308 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
309 for details on the per-unit settings.</para></listitem>
313 <term><varname>DefaultLimitCPU=</varname></term>
314 <term><varname>DefaultLimitFSIZE=</varname></term>
315 <term><varname>DefaultLimitDATA=</varname></term>
316 <term><varname>DefaultLimitSTACK=</varname></term>
317 <term><varname>DefaultLimitCORE=</varname></term>
318 <term><varname>DefaultLimitRSS=</varname></term>
319 <term><varname>DefaultLimitNOFILE=</varname></term>
320 <term><varname>DefaultLimitAS=</varname></term>
321 <term><varname>DefaultLimitNPROC=</varname></term>
322 <term><varname>DefaultLimitMEMLOCK=</varname></term>
323 <term><varname>DefaultLimitLOCKS=</varname></term>
324 <term><varname>DefaultLimitSIGPENDING=</varname></term>
325 <term><varname>DefaultLimitMSGQUEUE=</varname></term>
326 <term><varname>DefaultLimitNICE=</varname></term>
327 <term><varname>DefaultLimitRTPRIO=</varname></term>
328 <term><varname>DefaultLimitRTTIME=</varname></term>
330 <listitem><para>These settings control various default
331 resource limits for units. See
332 <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
333 for details. Use the string <varname>infinity</varname> to
334 configure no limit on a specific resource. These settings may
335 be overridden in individual units using the corresponding
336 LimitXXX= directives. Note that these resource limits are only
337 defaults for units, they are not applied to PID 1
338 itself.</para></listitem>
344 <title>See Also</title>
346 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
347 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
348 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
349 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
350 <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
351 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>