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