重庆熊猫 Loading

慢到不能忍?别忍了,Ubuntu 21.10 APT 源修改为华为云镜像源

更新记录
2022年4月15日:本文迁移自Panda666原博客,原发布时间:2021年3月29日。
2022年4月15日:将源改为华为云,华为云更方便。Ubuntu从20.04更新到21.10。

切换为 root 账户

su root

备份默认源的文件

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

修改为国内的华为云镜像源

sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list

更新 apt-get 源

apt-get update

至此Ubuntu APT 源修改为阿里云镜像源完成。

在vim中查看修改的信息(这步不是必须的)

vim /etc/apt/sources.list

参考网站:
https://mirrors.huaweicloud.com/home
https://developer.aliyun.com/mirror/ubuntu

posted @ 2022-04-15 15:00  重庆熊猫  阅读(910)  评论(0编辑  收藏  举报