非root用户复制以下全部命令,粘到命令行搞回车执行。
以下同时使用阿里和大工的源,如果只使用其中一个,自己删除另一个再执行
----------------------------------
sudo -v;\
sudo mv -f /etc/apt/sources.list /etc/apt/sources.list.bk; \
echo -e \
" deb http://mirror.dlut.edu.cn/ubuntu/ focal main restricted universe multiverse\n \
deb-src http://mirror.dlut.edu.cn/ubuntu/ focal main restricted universe multiverse\n \
deb http://mirror.dlut.edu.cn/ubuntu/ focal-security main restricted universe multiverse\n \
deb-src http://mirror.dlut.edu.cn/ubuntu/ focal-security main restricted universe multiverse\n \
deb http://mirror.dlut.edu.cn/ubuntu/ focal-updates main restricted universe multiverse\n \
deb-src http://mirror.dlut.edu.cn/ubuntu/ focal-updates main restricted universe multiverse\n \
deb http://mirror.dlut.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse\n \
deb-src http://mirror.dlut.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse\n \
deb http://mirror.dlut.edu.cn/ubuntu/ focal-backports main restricted universe multiverse\n \
deb-src http://mirror.dlut.edu.cn/ubuntu/ focal-backports main restricted universe multiverse\n"\
|sudo tee /etc/apt/sources.list; \
echo -e \
" deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\n \
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\n \
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\n \
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\n \
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\n \
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\n \
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\n \
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\n \
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\n \
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\n" \
|sudo tee -a /etc/apt/sources.list; \
sudo apt-get update