]> git.proxmox.com Git - systemd.git/blob - man/sysctl.d.5
Imported Upstream version 214
[systemd.git] / man / sysctl.d.5
1 '\" t
2 .TH "SYSCTL\&.D" "5" "" "systemd 214" "sysctl.d"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sysctl.d \- Configure kernel parameters at boot
24 .SH "SYNOPSIS"
25 .PP
26 /etc/sysctl\&.d/*\&.conf
27 .PP
28 /run/sysctl\&.d/*\&.conf
29 .PP
30 /usr/lib/sysctl\&.d/*\&.conf
31 .SH "DESCRIPTION"
32 .PP
33 At boot,
34 \fBsystemd-sysctl.service\fR(8)
35 reads configuration files from the above directories to configure
36 \fBsysctl\fR(8)
37 kernel parameters\&.
38 .SH "CONFIGURATION FORMAT"
39 .PP
40 The configuration files contain a list of variable assignments, separated by newlines\&. Empty lines and lines whose first non\-whitespace character is
41 "#"
42 or
43 ";"
44 are ignored\&.
45 .PP
46 Note that either
47 "/"
48 or
49 "\&."
50 may be used as separators within sysctl variable names\&. If the first separator is a slash, remaining slashes and dots are left intact\&. If the first separator is a dot, dots and slashes are interchanged\&.
51 "kernel\&.domainname=foo"
52 and
53 "kernel/domainname=foo"
54 are equivalent and will cause
55 "foo"
56 to be written to
57 /proc/sys/kernel/domainname\&. Either
58 "net\&.ipv4\&.conf\&.enp3s0/200\&.forwarding"
59 or
60 "net/ipv4/conf/enp3s0\&.200/forwarding"
61 may be used to refer to
62 /proc/sys/net/ipv4/conf/enp3s0\&.200/forwarding\&.
63 .PP
64 Each configuration file shall be named in the style of
65 \fIprogram\fR\&.conf\&. Files in
66 /etc/
67 override files with the same name in
68 /usr/lib/
69 and
70 /run/\&. Files in
71 /run/
72 override files with the same name in
73 /usr/lib/\&. Packages should install their configuration files in
74 /usr/lib/\&. Files in
75 /etc/
76 are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\&. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in\&. If multiple files specify the same variable name, the entry in the file with the lexicographically latest name will be applied\&. It is recommended to prefix all filenames with a two\-digit number and a dash, to simplify the ordering of the files\&.
77 .PP
78 If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to
79 /dev/null
80 in
81 /etc/sysctl\&.d/
82 bearing the same filename\&.
83 .PP
84 The settings configured with
85 sysctl\&.d
86 files will be applied early on boot\&. The network interface\-specific options will also be applied individually for each network interface as it shows up in the system\&. (More specifically,
87 net\&.ipv4\&.conf\&.*,
88 net\&.ipv6\&.conf\&.*,
89 net\&.ipv4\&.neigh\&.*
90 and
91 net\&.ipv6\&.neigh\&.*)
92 .SH "EXAMPLE"
93 .PP
94 \fBExample\ \&1.\ \&/etc/sysctl.d/domain-name.conf example:\fR
95 .sp
96 .if n \{\
97 .RS 4
98 .\}
99 .nf
100 # Set kernel YP domain name
101 kernel\&.domainname=example\&.com
102 .fi
103 .if n \{\
104 .RE
105 .\}
106 .SH "SEE ALSO"
107 .PP
108 \fBsystemd\fR(1),
109 \fBsystemd-sysctl.service\fR(8),
110 \fBsystemd-delta\fR(1),
111 \fBsysctl\fR(8),
112 \fBsysctl.conf\fR(5)