更换ubuntu apt-get 源

为了优化ubuntu软件安装/更新速度,我测试了国内几家apt源的速度,发现北京交大的apt源速度相对最快,然后可以通过以下步骤更新ubuntu源

1) 备份默认的apt源

1 $ cd /etc/apt
2 $ sudo cp sources.list sources.list.backup

2) 编辑

$ sudo gedit sources.list

复制粘贴以下列表:

 1 deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
 2 deb http://archive.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
 3 deb http://archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse
 4 deb http://archive.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
 5 deb http://archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
 6 deb-src http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
 7 deb-src http://archive.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
 8 deb-src http://archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse
 9 deb-src http://archive.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
10 deb-src http://archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

 3) 注意,每次修改完apt源,一定要执行一下更新

$ sudo apt-get update

大概花了几分钟,更新完成之后,就可以使用apt来安装应用程序了。

备注:ubuntu apt源列表 http://wiki.ubuntu.org.cn/源列表

posted on 2014-03-10 11:22  一路前行  阅读(68673)  评论(3编辑  收藏  举报