16

I couldn't find an answer in the man pages for sysctl. My sysctl.conf file is still at its default state. I'm testing several values and loaded new settings via sysctl -p newsettings.conf. I thought it would be sufficient for reseting to do sysctl -p (which means that it reads the values from sysctl.conf), but a fast sysctl -a | grep domain revealed that they are still the old settings.

Any ideas?

RonU
  • 107
Fleshgrinder
  • 3,918

2 Answers2

20

As far as I know there is no "undo" for sysctl -- You need to re-enter the default settings (typically /etc/sysctl.conf simply does not specify defaults, so re-reading it won't revert your changes unless there's an explicit setting).

If you do not know your default settings a reboot will get them back, and you can then list them with sysctl -a (store this somewhere for reference). If you have another mostly-identical machine around you can grab the sysctl -a output from that host instead of rebooting.

voretaq7
  • 80,749
2

Sysctl Defaults

On CentOS 7, look at

/usr/lib/sysctl.d/

to get the default settings that ship with the OS.

Aaron
  • 2,899
  • 2
  • 14
  • 31