Ubuntu 更换源
2019-11-14 本文已影响0人
wlianfu
- 起源: 双十一云服务器优惠,同时买了阿里云,腾讯云的和华为云的服务器。阿里云和华为云服务器都是 ubuntu,使用后发现华为云的服务器上使用的源相当的慢,阿里云的源速度是非常的理想的,所以把华为云的 Ubuntu 切换成了阿里的源。
- 步骤如下:
- 先备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 将source.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
尊重原创: (这里是备份下次方便自己操作)
https://yq.aliyun.com/articles/704603
- 对比了之后发现阿里云服务器上用的是阿里云的源,截图参考下
- 其实可以将阿里云的源文件直接拷贝到华为云上来(包括腾讯云,因为网络还是没有阿里云的好)。先用着看看...