禁用ipv6: sudo vi /etc/sysctl.conf 添加:更换dns:net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 保存退出sudo sysctl -p 最后用:ip a | grep inet6验证,如没有任何输出则禁用成功!或者用ifconfig看有没有ipv6.
路径:/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 202.38.193.33#你的dns
nameserver 127.0.0.1
search lan
路径:/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.166
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 127.0.0.1
dns-nameservers 202.38.193.33#你的dns
路径:/etc/resolvconf/resolv.conf.d/base
nameserver 127.0.0.1
nameserver 202.38.193.33
路径:/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=true
更换源:
路径:/etc/apt/source.list
#中国科技大学
deb http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
apt-get update更新就可以了
转载自:http://www.ithao123.cn/content-2717974.html
转载自:http://www.07net01.com/linux/ubuntu12_04_jinyong_ipv6_11583_1346037862.html
转载自:http://www.myhack58.com/Article/48/66/2015/61855.htm