Is there a good reason that sysctl is broken into so many configuration files across multiple directories?
Is there a reason I can't delete all the sysctl.d configuration files and put everything in /etc/sysctl.conf?
My system is running Xubuntu 20.04 and sysctl.d directories:
/etc/sysctl.d//usr/lib/sysctl.d/
But there must be other config files with sysctl keys, because if I run:
# sudo sysctl --system
it outputs all the keys from my custom /etc/sysctl.conf file and all the keys from the various sysctl.d files.
However, if I run:
# sudo sysctl -a
it outputs tons of keys not explicitly set (by me anyway).
I guess I also really need to know how to locate all the config files that load sysctl keys into the kernel.
man sysctl only list a total of 6 possible locations for sysctl config files:
/run/sysctl.d/which doesn't exist./etc/sysctl.d/which contains 8 configuration files generated by the OS and99-sysctl.confsymlink to/etc/sysctl.conf./usr/local/lib/sysctl.d/which doesn't exist./usr/lib/sysctl.d/which contains 3 files set by OS./lib/sysctl.d/which is the same as/usr/lib/sysctl.d/although it doesn't show a symlink./etc/sysctl.confmy heavily modifiedsysctlfile.
I have gone through all of the individual config files and they do not account for even half of the sysctl keys loaded into the kernel. I understand that some applications can set sysctl keys, but there must be other configuration files loading all these keys into the kernel.
Other than options for sysctl command, the man page doesn't have any other data.