How to reset sysctl to it's OS defaults?
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.