1、为什么禁用ipv6
因为ipv6和ipv4一起显示,感觉特表混乱,所以想禁用
[root@shell ~]#
[root@shell ~]# ip a #未禁用前

2、禁用ipv6
[root@shell ~]#
[root@shell ~]# vi /etc/sysctl.conf #编辑配置文件
# 将以下两行内容加入配置文件即可
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

[root@shell ~]#
[root@shell ~]# sysctl -p #使上面的配置立即生效

[root@shell ~]#
[root@shell ~]# ip a #查看ipv6是否被禁用掉
