https://developer.aliyun.com/article/751568
获取系统版本
lsb_release -a | grep Codename | awk '{print $2}' # 输出结果为下文中的Codename
cd /etc/apt
sudo mv sources.list sources.list.bak
vi sources.list
写入内容,bionic是系统版本,需改
deb http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
更新生效
apt-get update
备注:可以通过http://mirrors.aliyun.com/ubuntu/dists/网站查看是否支持当前系统的Codename。