Ubuntu(三):提高apt-get更新速度的方法
2010-04-05 21:04
441 查看
个人认为,apt-get是Ubuntu底下perfect的一个功能。你要的大部分功能都可以通过该命令实现。该命令其实就是到服务器上下载你请求安装的软件源,并进行安装。但要命的是:其默认的安装源为欧洲官方安装源,对于我们来说,速度太慢了,经常只有几byte/s。怎么办?其实只要将更新源修改为国内Ubuntu的更新源就可以了。请按如下操作:
首先,替换更新源:
将该文件的内容删除,替换为以下内容:
# 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
其次,更新命令并更新系统:
之后我们在用apt-get更新软件的时候是不是明显感觉快了很多,我这边测试时经常都是1秒钟几M的速度。
附录中还有目前我所知的所有更新源。有兴趣的话大家也可以试试看。推荐只要使用一两套更新源,多了系统更新软件源的时候会花费较多时间,且系统也不会自动选择最快的更新源。
首先,替换更新源:
$ 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的速度。
附录中还有目前我所知的所有更新源。有兴趣的话大家也可以试试看。推荐只要使用一两套更新源,多了系统更新软件源的时候会花费较多时间,且系统也不会自动选择最快的更新源。
相关文章推荐
- Linux 系统操作简记 -- 修改Ubuntu apt-get 与 pip更新源,提高安装速度
- ubuntu 下更新软件源,提高apt-get下载速度
- Ubuntu apt-get update 无法更新速度是0的情况解决方法
- Ubuntu apt-get 更换源,以提高下载速度
- 为apt-get设置HTTP代理(使用代理更新Ubuntu的方法)
- apt-get update 更新 ubuntu时出现Hash sum mismatch的原因及解决方法
- [Linux]Ubuntu修改apt-get镜像地址提高下载速度
- Ubuntu apt-get 更换源,以提高下载速度
- Ubuntu apt-get更新及安装软件失败的解决方法
- Ubuntu修改apt-get镜像地址提高下载速度
- ubuntu apt-get 代理设置 使用代理设置源(使用代理更新Ubuntu的方法)
- Ubuntu更新apt-get的源的方法以及其他源推荐
- 【原创】Ubuntu sudo apt-get 更新列表相关
- VMWare安装Ubuntu10.10 server版的NAT方式上网方法,以及apt-get使用公司代理安装程序的方法
- Ubuntu/Debian下 apt-get command not found 命令无法找到的解决方法
- Ubuntu - 运行 apt-get install 就出现jdk installer 错误的解决方法
- Ubuntu不能用apt-get更新软件源
- Ubuntu apt-get命令更新
- ubuntu软件更新源,更改,可提高更新的速度