红联Linux门户
Linux帮助

ubuntu 12.04使用更快的更新源

发布时间:2015-11-01 09:35:58来源:linux网站作者:linux_zhu

装好ubuntu系统后的第一见事就是替换自带的更新源,原因是系统自带的源有些在中国访问不了,可以访问的速度又特别慢。


备份sources.list文件:

cp /etc/apt/sources.list /etc/apt/sources.list.backup


打开sources.list:  (打开之前最好是安装vim,vi确实不太好用  apt-get install vim)

vi /etc/apt/sources.list


修改sources.list,将sources.list内容全部替换为以下内容:(个人觉得sohu的源比较快吧)


deb http://mirrors.sohu.com/ubuntu/ precise main restricted

deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted

deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted

deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted

deb http://mirrors.sohu.com/ubuntu/ precise universe

deb-src http://mirrors.sohu.com/ubuntu/ precise universe

deb http://mirrors.sohu.com/ubuntu/ precise-updates universe

deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe

deb http://mirrors.sohu.com/ubuntu/ precise multiverse

deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse

deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse

deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse

deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted

deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted

deb http://mirrors.sohu.com/ubuntu/ precise-security universe

deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe

deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse

deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse


保存对source.list的修改。


更新源信息:

sudo apt-get update


Ubuntu 15.10更新源已可用,更新到Ubuntu 15.10的方法:http://www.linuxdiyf.com/linux/11955.html

Ubuntu 15.04更新源:http://www.linuxdiyf.com/linux/11839.html

为Linux配置apt-get的更新源:http://www.linuxdiyf.com/linux/12073.html