1.备份源文件
bashcp /etc/apt/sources.list /etc/apt/sources.list.bak
2.打开源文件,注释默认的源
bashvim /etc/apt/sources.list
bash## 注释原本内容 # deb http://mirrors.ivolces.com/ubuntu/ focal main restricted universe multiverse # deb-src http://mirrors.ivolces.com/ubuntu/ focal main restricted universe multiverse # deb http://mirrors.ivolces.com/ubuntu/ focal-security main restricted universe multiverse # deb-src http://mirrors.ivolces.com/ubuntu/ focal-security main restricted universe multiverse # deb http://mirrors.ivolces.com/ubuntu/ focal-updates main restricted universe multiverse # deb-src http://mirrors.ivolces.com/ubuntu/ focal-updates main restricted universe multiverse # deb http://mirrors.ivolces.com/ubuntu/ focal-proposed main restricted universe multiverse # deb-src http://mirrors.ivolces.com/ubuntu/ focal-proposed main restricted universe multiverse # deb http://mirrors.ivolces.com/ubuntu/ focal-backports main restricted universe multiverse # deb-src http://mirrors.ivolces.com/ubuntu/ focal-backports main restricted universe multiverse ## 添加新内容 deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse 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 deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
3.保存退出ESC+:wq!
4.更新源
bashapt-get update
5.更新系统软件
bashapt-get dist-upgrade apt-get upgrade
Ubuntu20.04如何更换国内源-阿里云源
心软且酷丶2023-08-31 21:43