# 移动到源文件路径
$ cd /etc/apt
# 备份原有源文件
$ sudo cp sources.list sources.list.bak
# 删除源文件中所有内容, 并粘贴下方阿里云源内容
$ sudo vim sources.list
# 更新源
$ sudo apt update
$sudo apt upgrade
阿里云源内容 :
deb http://mirrors.aliyun.com/ubuntu/bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/bionic-backports main restricted universe multiverse
163源:
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse