File: sysctl.conf.5

package info (click to toggle)
procps 2%3A4.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,424 kB
  • sloc: ansic: 32,770; sh: 5,995; exp: 775; makefile: 691; sed: 16
file content (109 lines) | stat: -rw-r--r-- 2,420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.\"
.\" Copyright (c) 2016-2023 Jim Warner <james.warner@comcast.net>
.\" Copyright (c) 2019-2025 Craig Small <csmall@dropbear.xyz>
.\" Copyright (c) 2011-2012 Sami Kerola <kerolasa@iki.fi>
.\" Copyright (c) 1999      George Staikos <staikos@0wned.org>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\"
.TH SYSCTL.CONF 5 2025-05-29 procps-ng
.SH NAME
sysctl.conf \- Linux kernel configuration parameters
.SH DESCRIPTION
.B sysctl.conf
is a set of configuration files that contain
Linux kernel configuration parameters
to be read and set by
.BR sysctl (8).
.PP
This man page describes the configuration files for
.I procps
.BR sysctl .
If you are using
.BR systemd\-sysctl (8),
refer to
.BR sysctl.d (5)
and note that it won't use the file
.IR \%/etc/\:\%sysctl\:\%.conf .
.SS "Configuration Format"
Each line of a file read by
.I procps
.B sysctl
describes a kernel parameter in the following format.
.P
.RS
.EX
token = value
.EE
.RE
.P
.P
There is no need to use quotation marks for \fIvalue\fR, even if the value
is a list of items.
.P
Blank lines and lines that start with
.RB \[lq] # \[rq]
or
.RB \[lq] ; \[rq]
are ignored.
.P
If a line begins with a single
.RB \[lq] \- \[rq],
a failing attempt to set the value is ignored.
.SH FILES
.I procps
.BR sysctl ,
when run with the
.B \%\-\-system
option,
reads files from directories
in the order shown below.
.P
.RS
.TP
.IR /etc/sysctl.d/ * .conf
.TQ
.IR /run/sysctl.d/ * .conf
.TQ
.IR /usr/local/lib/sysctl.d/ * .conf
.TQ
.IR /usr/lib/sysctl.d/ * .conf
.TQ
.IR /lib/sysctl.d/ * .conf
.RE
.P
Finally,
.I procps
.B sysctl
reads
.IR \%/etc/\:\%sysctl\:\%.conf .
This file is not used by
.BR systemd\-sysctl ,
which means that some kernel parameters are not set depending on the
implementation of
.B sysctl
that is installed.
.SH BUGS
The maximum supported length of
.I value
is 4096 characters due to a limitation on
.I /proc
entry length in the Linux kernel.
.SH EXAMPLES
.EX
#
#
kernel.domainname = example.com
; A value containing a space is written to the sysctl.
kernel.modprobe = /sbin/mod probe
# A list of items for the value
net.ipv4.ip_local_reserved_ports=8080,9148
.EE
.SH "SEE ALSO"
.BR sysctl.d (5),
.BR sysctl (8),
.BR systemd\-sysctl (8)