Ubuntu20.04更换国内源Ubuntu 20.04 Linux更换源教程
为了更快的下载速度,我们常常需要把Ubuntu⾃带的国外源换成国内源
更换源步骤如下:
1、备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、命令⾏打开sources.list⽂件
sudo vim /etc/apt/sources.list
3、修改sources.list⽂件
sudo vim /etc/apt/sources.list
将源⽂件内容全部注释,并添加以下内容任意源
阿⾥云源
deb mirrors.aliyun/ubuntu/ focal main restricted universe multiverse
deb-src mirrors.aliyun/ubuntu/ focal main restricted universe multiverse
deb mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse
deb-src mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse
deb mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse
deb-src mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse
deb mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse
deb-src mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse
deb mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse
deb-src mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse
清华源
国内源代码网站
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal main restricted
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-updates main restricted
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal universe
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-updates universe
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal multiverse
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-updates multiverse
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-backports main restricted universe multiverse deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-security main restricted
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-security universe
deb mirrors.tuna.tsinghua.edu/ubuntu/ focal-security multiverse
4、保存:ESC+:wq!
5、更新源
sudo apt-get update
6、更新软件,然后你就可以感受到更换国内源之后的飞速提升了
sudo apt-get dist-upgrade
sudo apt-get upgrade

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。