]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/standard-conf.xml
travis: add more ASan options
[thirdparty/systemd.git] / man / standard-conf.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE refsection PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7 Copyright © 2014 Josh Triplett
8 -->
9
10 <refsection>
11 <refsection id='confd'>
12 <title>Configuration Directories and Precedence</title>
13
14 <para>Configuration files are read from directories in <filename>/etc/</filename>, <filename>/run/</filename>,
15 <filename>/usr/local/lib/</filename>, and <filename>/usr/lib/</filename>, in order of precedence. Each
16 configuration file in these configuration directories shall be named in the style of
17 <filename><replaceable>filename</replaceable>.conf</filename>. Files in <filename>/etc/</filename> override files
18 with the same name in <filename>/run/</filename>, <filename>/usr/local/lib/</filename>, and
19 <filename>/usr/lib/</filename>. Files in <filename>/run/</filename> override files with the same name under
20 <filename>/usr/</filename>.</para>
21
22 <para>Packages should install their configuration files in <filename>/usr/lib/</filename> (distribution packages)
23 or <filename>/usr/local/lib/</filename> (local installs). Files in <filename>/etc/</filename> are
24 reserved for the local administrator, who may use this logic to override the
25 configuration files installed by vendor packages. All configuration files
26 are sorted by their filename in lexicographic order, regardless of which of
27 the directories they reside in. If multiple files specify the same option,
28 the entry in the file with the lexicographically latest name will take
29 precedence. It is recommended to prefix all filenames with a two-digit number
30 and a dash, to simplify the ordering of the files.</para>
31
32 <para>If the administrator wants to disable a configuration file supplied by
33 the vendor, the recommended way is to place a symlink to
34 <filename>/dev/null</filename> in the configuration directory in
35 <filename>/etc/</filename>, with the same filename as the vendor
36 configuration file. If the vendor configuration file is included in
37 the initrd image, the image has to be regenerated.</para>
38 </refsection>
39
40 <refsection id='main-conf'>
41 <title>Configuration Directories and Precedence</title>
42
43 <para>The default configuration is defined during compilation, so a
44 configuration file is only needed when it is necessary to deviate
45 from those defaults. By default, the configuration file in
46 <filename>/etc/systemd/</filename> contains commented out entries
47 showing the defaults as a guide to the administrator. This file
48 can be edited to create local overrides.
49 </para>
50
51 <para>When packages need to customize the configuration, they can
52 install configuration snippets in
53 <filename>/usr/lib/systemd/*.conf.d/</filename> or
54 <filename>/usr/local/lib/systemd/*.conf.d/</filename>. Files in
55 <filename>/etc/</filename> are reserved for the local
56 administrator, who may use this logic to override the
57 configuration files installed by vendor packages. The main
58 configuration file is read before any of the configuration
59 directories, and has the lowest precedence; entries in a file in
60 any configuration directory override entries in the single
61 configuration file. Files in the <filename>*.conf.d/</filename>
62 configuration subdirectories are sorted by their filename in lexicographic
63 order, regardless of which of the subdirectories they reside in. When
64 multiple files specify the same option, for options which accept just a
65 single value, the entry in the file with the lexicographically latest name
66 takes precedence. For options which accept a list of values, entries are
67 collected as they occur in files sorted lexicographically. It is recommended
68 to prefix all filenames in those subdirectories with a two-digit number and
69 a dash, to simplify the ordering of the files.</para>
70
71 <para>To disable a configuration file supplied by the vendor, the
72 recommended way is to place a symlink to
73 <filename>/dev/null</filename> in the configuration directory in
74 <filename>/etc/</filename>, with the same filename as the vendor
75 configuration file.</para>
76 </refsection>
77 </refsection>