ubuntu 12.04 提高更新网速的方法

ubuntu 12.04 提高更新网速的方法

ubuntu用户经常会在终端下使用sudo apt-get update对软件源进行更新,但从默认的下载服务器下载速度只有不及正常网速的1/5。下面介绍更改为阿里云服务器的方法。

1.首先修改系统中的 /etc/apt/sources.list文件。在终端下键入

sudo gedit /etc/apt/sources.list

2.更改为阿里云服务器。删掉其中所有内容,并把下面内容粘贴进去:

deb http://mirrors.aliyun.com/ubuntu/ version main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ version-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ version-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ version-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ version-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ version main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ version-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ version-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ version-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ version-backports main restricted universe multiverse

3.将代码中的”version”处替换为当前ubuntu的版本代号。12.04的代号是”precise”,所以将”version”改成”precise”。使用快捷键CTRL+F找到”version”,再用CTRL+H进行替换即可。效果如下所示:

deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise
main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

4.最后更新软件源就会看到网速的提升!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值