/run/sysctl.d/
which doesn't exist.
/run
is temporary, changes in it are lost at reboot. So drop-in configuration files in /run
are used for modifying the current boot, but without persisting those changes past reboot.
/etc/sysctl.d/
which contains 8 configuration files generated by the OS and 99-sysctl.conf
symlink to /etc/sysctl.conf
.
This is where configuration from packages that are allowed to be modified by the admin will be kept. dpkg
will inform you when your edits conflict with package updates.
/usr/local/lib/sysctl.d/
which doesn't exist.
/usr/local
is meant for the admin's use, and packages won't do anything there. You are supposed to make the directory should you need it.
/usr/lib/sysctl.d/
which contains 3 files set by OS.
Files in /usr/lib
are not meant to be modified by the admin. Package updates will overwrite changes here.
/lib/sysctl.d/
which is the same as /usr/lib/sysctl.d/
although it doesn't show a symlink.
Since the /usr
merge, /bin
, /lib
, etc. are symlinks to the corresponding directories in /usr
.
/etc/sysctl.conf
my heavily modified sysctl
file.
Left around for backwards compatibility, since people (and scripts and other tools) will still expect it.
Modifying configuration transactionally is easiest when you can just add or remove a file with the exact contents you want, instead of using regexes or whatever to modify a line in the middle of a configuration file filled with who-knows-what. That is directories allowing drop-in configuration files are highly preferable to single configuration files.