ubuntu 20.04关闭IPV6
基础系统信息 Ubuntu 20.04
step 1:使用如下参数临时关闭IPV6,设备重启后参数失效
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
永久关闭IPV6的方法
step 1: 备份/etc/default/grub文件
sudo cp -v /etc/default/grub /etc/default/grub.bak
step 2: 修改/etc/default/grub配置
编辑/etc/default/grub,在GRUB_CMDLINE_LINUX里面增加ipv6.disable=1参数
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
step 3: 更新grub信息
sudo update-grub
step 4: 重启设备
sudo reboot
参考链接
https://www.geekpills.com/operating-system/linux/disable-ipv6-on-ubuntu-20-04

浙公网安备 33010602011771号