请知悉:本文最近一次更新为 3年 前,文中内容可能已经过时。

最近组里新装了3台服务器,是Ubuntu 20.04的,国内使用嘛,源自然要切换下,网上介绍鱼龙混杂,用的源有问题经常会出现各种莫名其妙的问题,所以自己测试后,发现使用阿里的源是没问题的。

切换阿里源的方法:

cp /etc/apt/sources.list /etc/apt/sources.list.old
cat <<EOF > /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF

指令什么意思,自己琢磨吧~没什么可解释的。


参考资料

[Linux]Ubuntu 20.04换阿里源


如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《Ubuntu 20.04 切换 阿里源方法》相关的博文:


留言

avatar
😀
😀😁😂😅😭🤭😋😘🤔😰😱🤪💪👍👎🤝🌹👌