Ubuntu 20.04 更换国内镜像源

Ubuntu采用apt作为软件安装工具,其镜像源列表记录在/etc/apt/source.list文件中。修改该文件内容即可更改镜像源。

备份原文件

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

镜像源

阿里云

1
2
3
4
5
6
7
8
9
10
11
12
13
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

## Pre-released source, not recommended.
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

清华

参考

本文参考以下文章,在此致以诚挚谢意!

Ubuntu20.04更换国内镜像源(阿里、网易163、清华、中科大)