You are not logged in.
Pages: 1
I've set a decent number of custom rules in command line like '# sysctl kernel.example=1' that I'd like removed through a default reset.
Is there any command to reset all sysctl rules to defaults? Or must I find the directory/file they're written to, and then find a default version of the file?
Last edited by BlueYoshi (2015-09-06 23:15:55)
Offline
As far as I know, there is no command to "reset" sysctl settings in a live system. However, changing sysctl values in the way that you described only last until you reboot. When you reboot, the default values are used unless you have overridden them in sysctl.d config files.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
As far as I know, there is no command to "reset" sysctl settings in a live system. However, changing sysctl values in the way that you described only last until you reboot. When you reboot, the default values are used unless you have overridden them in sysctl.d config files.
Ah, I'd forgotten. I've been compulsively going through journalctl all day trying to clear up any sort of warning I could find.
I think I realize what the issue is now. I was seeing this in the logs: [systemd-sysctl[235]: Couldn't write '1' to 'net/ipv6/conf/all/disable_ipv6', ignoring: No such file or directory], and I just remembered now that since I also disable the IPv6 stack from kernel parameter, the sysctl.d file to disable must be failing since IPv6 was already killed before it was executed.
Offline
Pages: 1