step-1 备份源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.copy
step-2 找对应版本的清华源,并复制
地址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
step-2 编辑,删除原有配置内容,粘贴新的地址源
sudo gedit /etc/apt/sources.list
完整配置如下
我使用的Ubuntu版本为18.04
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
保存退出
step-4 更新
sudo apt-get update
标签:cn,mirrors,配置,更新,tsinghua,https,edu,ubuntu,下载
From: https://www.cnblogs.com/zhaobangyu/p/17645610.html