SYSCTL.CONF(5)

๐Ÿ’– SYSCTL.CONF ๐Ÿ’–

okay bestie, so this is a file formats manual page โ€” the SYSCTL.CONF(5) one โ€” and it's literally the blueprint for how you tell your Linux kernel what it should be doing. no cap.


โœจ NAME โœจ

sysctl.conf โ€” Linux kernel configuration parameters ๐ŸŽ€


๐ŸŒธ DESCRIPTION ๐ŸŒธ

sysctl.conf is a whole set of configuration files, and they contain Linux kernel configuration parameters โ€” the ones that get read and set by sysctl(8). it's giving "kernel settings, but make it a text file". ๐Ÿ’…

This man page is specifically about the configuration files for procps sysctl. So if you're out here using systemd-sysctl(8) instead, go read sysctl.d(5) โ€” and heads up, queen, it won't use the file /etc/sysctl.conf. different implementation, different rules. ๐Ÿฆ‹

๐Ÿ“ Configuration Format

Each line of a file that procps sysctl reads describes a kernel parameter, and it looks like this:

token = value

and no โ€” you do not need quotation marks around value, even when value is a whole list of items. the file just gets it. iconic. โœจ

Blank lines? ignored. Lines that start with # or ;? also ignored. those are your comment lines, bestie. ๐Ÿ’œ

and here's a lil trick: if a line begins with a single -, then a failing attempt to set the value is ignored. so it's like "try it, but don't be dramatic if it doesn't work". ๐Ÿ™ˆ


๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

procps sysctl, when you run it with the --system option, reads files from these directories โ€” in this exact order, no skipping, no shuffling:

/etc/sysctl.d/*.conf
/run/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf

and finally, procps sysctl reads /etc/sysctl.conf. ๐Ÿ‘‘

โš ๏ธ that last file is not used by systemd-sysctl โ€” which means some kernel parameters are just not set, depending on which implementation of sysctl you have installed. so like, know which one you're running, fr fr. ๐Ÿ˜ญ

๐Ÿ’€ BUGS ๐Ÿ’€

The maximum supported length of value is 4096 characters, because of a limitation on /proc entry length in the Linux kernel. so don't go writing a whole novel in there, bestie. 4096 and that's it. periodt.


๐ŸŒˆ EXAMPLES ๐ŸŒˆ

#
#
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

look at that โ€” comments, a value with a space in it, and a whole comma-separated list. all three vibes, one file. ate. ๐Ÿ”ฅ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

sysctl.d(5), sysctl(8), systemd-sysctl(8)


and that's the whole page, bestie ๐Ÿซถ this was procps-ng, dated 2025-05-29, and you're officially a SYSCTL.CONF(5) girlie now. go set some kernel parameters. slay. ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from