Ubuntu系统的安装源配置文件是/etc/apt/sources.list
修改之前先备份,

cd /etc/apt/
cp sources.list sources.list.bk

然后编辑sources.list,

vim sources.list

将原有的内容替换为以下内容:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src 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-backports main restricted universe multiverse

保存、退出,更新。

:wq
apt-get update

PS.在这里,同时附上Debian 10的源,如下

deb http://mirrors.ustc.edu.cn/debian/ buster main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ buster-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian-security/ buster/updates main non-free contrib

更新于2019-07-12 23:19:40