更换ubuntu apt-get 源

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

1) 备份默认的apt源

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

2) 编辑

$ sudo gedit sources.list

复制粘贴以下列表:

 deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
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/源列表

上一篇:超越线程池:Java并发并没有你想的那么糟糕


下一篇:logback整合Logstash