1.备份源文件
cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.打开源文件,注释默认的源
vim /etc/apt/sources.list
## 注释原本内容 # 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.更新源文章来源:https://www.toymoban.com/news/detail-684118.html
apt-get update
5.更新系统软件文章来源地址https://www.toymoban.com/news/detail-684118.html
apt-get dist-upgrade apt-get upgrade
到了这里,关于Ubuntu20.04如何更换国内源-阿里云源的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!