阅读 352

Ubuntu 20.04系统更改apt源为阿里源

ubuntu-20.04.2.0-desktop-amd64.iso分享链接!
链接:pan.xunlei.com/s/VMb2D2hRR…
提取码:fd98
复制这段内容后打开手机迅雷App,查看更方便

1.查看版本代号

使用命令:

lsb_release -c
复制代码

在这里插入图片描述得到本版本系统的系统代号,可以看到版本代号为:focal!每个版本的代号是不一样的

2.编辑sources.list文件(咱用自带的nano他不爽吗!)

执行如下命令:

nano /etc/apt/sources.list
复制代码

3.现在我们开始编辑文件,先把原有内容注释,添加如下内容:

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-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports 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
复制代码

ctrl+x保存并退出!

4.一键更新命令:

apt-get update && apt-get upgrade && apt-get dist-upgrade     && apt-get clean 
复制代码

到此apt源已成功修改为阿里源,棒哦!!!

文章分类
后端
文章标签