Software >> OS >> Unix >> Linux >> RHEL >> 7 >> How to use sysctl to read or configure kernel parameters


sysctl -a list the runtime kernel parameters
vi /etc/sysctl.conf set persistent kernel parameters, that will be set upon reboot
sysctl -w net.ipv6.conf.all.disable_ipv6=1 set runtime value of the kernel parameter
sysctl -p apply the kernel parameters defined in /etc/sysctl.conf now without waiting for next reboot
sysctl -n net.ipv6.conf.all.disable_ipv6 show the value of the kernel parameter named net.ipv6.conf.all.disable_ipv6
sysctl net.ipv6.conf.all.disable_ipv6

reads the current paramter value