您的位置:首页 > 其它

Ubuntu(三):提高apt-get更新速度的方法

2010-04-05 21:04 441 查看
个人认为,apt-get是Ubuntu底下perfect的一个功能。你要的大部分功能都可以通过该命令实现。该命令其实就是到服务器上下载你请求安装的软件源,并进行安装。但要命的是:其默认的安装源为欧洲官方安装源,对于我们来说,速度太慢了,经常只有几byte/s。怎么办?其实只要将更新源修改为国内Ubuntu的更新源就可以了。请按如下操作:
首先,替换更新源:
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak.20090827
$ sudo gedit /etc/apt/sources.list
将该文件的内容删除,替换为以下内容:
# Ubuntu.cn99.com更新服务器(江苏省常州市电信,推荐电信用户使用)
 
deb http://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse
 
其次,更新命令并更新系统:
# sudo apt-get update
# sudo apt-get dist-upgrade
 
之后我们在用apt-get更新软件的时候是不是明显感觉快了很多,我这边测试时经常都是1秒钟几M的速度。
附录中还有目前我所知的所有更新源。有兴趣的话大家也可以试试看。推荐只要使用一两套更新源,多了系统更新软件源的时候会花费较多时间,且系统也不会自动选择最快的更新源。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息