linux下线查看ipv6是否开启
$
cat
/proc/sys/net/ipv6/conf/all/disable_ipv6
0
0代表开启
禁用IPv6方法:
12345$ vim /etc/sysctl.conf#disable ipv6net.ipv6.conf.all.disable_ipv6=1net.ipv6.conf.default.disable_ipv6=1net.ipv6.conf.lo.disable_ipv6=1使其生效:
1
$
sysctl
-p
最后确认是否已禁用:
1
2
$
cat
/proc/sys/net/ipv6/conf/all/disable_ipv6
1