Ubuntu 更换镜像源

由于不可描述的原因,原生的 Ubuntu 源非常慢,所以需要换到国内的一些镜像源,这里选用的是阿里云的镜像源

首先得进入 /etc/apt/ 目录

cd /etc/apt

其次,对 sources.list 文件进行备份

sudo cp sources.list sources.list.bak

然后打开 sources.list 文件

sudo vim sources.list

用下面的源替换掉文件中的源,完成后保存文件

# 阿里云
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

最后,更新源

sudo apt-get update

OJBK!!!

除特殊说明外本人博客均属原创,转载请注明出处:http://blog.johnhan.cn/blog_1058.html
京ICP备19044523号-1