ubuntu16.04更换清华的软件源快速下载

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yanying1113/article/details/86532174

ubuntu16.04更换清华的软件源


在使用ubuntu下载东西的时候,总是很慢,几十K,可以考虑更换软件源。之前在下载tensorflow时发现清华的源非常快,所以更换一下。
首先将源文件备份,然后修改源文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 
sudo gedit /etc/apt/sources.list 

将源文件内容改为以下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

关于其他版本的清华源可以查看地址

另外这里也给出了一些软件使用清华源下载的命令或资源,是个非常不错的资料。

最后用下面的命令更新就行了:

sudo apt-get update

猜你喜欢

转载自blog.csdn.net/yanying1113/article/details/86532174
今日推荐