image4dcab00a459d41c7.md.png

更改Ubuntu软件镜像源

Ubuntu 的软件源配置文件是

/etc/apt/sources.list

使用下面的命令编辑配置文件

$ sudo vim /etc/apt/sources.list

将系统自带的该文件做个 备份 将该文件替换为下面内容,即可使用 **TUNA (清华大学开源软件镜像站)**的软件源镜像。

我的Ubuntu版本是 16.04 LTS

对应的配置文件如下

# 默认注释了源码镜像以提高 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

其它Ubuntu版本的配置可点此


标题:更改Ubuntu软件镜像源
作者:expoli
地址:https://expoli.tech/articles/2018/04/20/1564656224783.html