2010-12-15

關閉 Ubuntu 的 Ipv6

Ubuntu 預設開啟 ipv6 ,但目前還不普及,加上有時候開啟會讓網路速度變慢。我有遇過 Firefox 在開啟時瀏覽網頁會變很慢,把他關閉瀏覽網頁就恢復正常。
可以單獨在 Firefox 關閉,但我不只一個帳號懶的一個一關,加上用不到直接在系統關閉了。



1、開啟 /etc/sysctl.conf 。

sudo gedit /etc/sysctl.conf
在底部增加程式碼。

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

2、立即套用設定。

sudo sysctl -p

3、沒出現文字就是已經關了 ipv6 了。

ip a | grep inet6

沒有留言:

張貼留言