ubuntu20.04如何更换国内源

798
2021/3/10 15:12:45
栏目: 智能运维
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

ubuntu20.04如何更换国内源

ubuntu20.04更换国内源的方法。

1.打开终端。

2.输入以下命令备份原来的源。

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.再输入以下命令打开sources.list配置文件更换源。

sudo vim/etc/apt/sources.list

//配置内容如下

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

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

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

deb 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 main restricted universe multiverse

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

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

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

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

4.再输入命令更新源。

sudo apt-get update

5.最后输入命令更新一下软件即可。

sudo apt-get upgrade

辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: ubuntu怎么查看磁盘空间使用情况