How to Disable IPv6 on Linux
Last updated on May 5th, 2023 in Setup
Follow this step-by-step tutorial to learn how to disable IPv6 on Linux from the command line.
sudo suand enter your password to act as root.
nano /etc/sysctl.confand press “Enter” to open the configuration file. Or, just use your favorite text editor to edit this file.
net.ipv6.conf.all.disable_ipv6 = 1; net.ipv6.conf.default.disable_ipv6 = 1; net.ipv6.conf.lo.disable_ipv6 = 1
cat /proc/sys/net/ipv6/conf/all/disable_ipv6and press “Enter”.
sysctl -p
cat /proc/sys/net/ipv6/conf/all/disable_ipv6and press “Enter”.