yycvip 发表于 2023-6-24 12:50:53

ubuntu20.04如何更换国内源

ubuntu20.04更换国内源的方法。以下更换为阿里云。如果是自己安装的Ubuntu,在安装设置时就可以直接更换为阿里云“https://mirrors.aliyun.com/ubuntu/”直接更换这个地址就可以了

1.打开终端。

2.输入以下命令备份原来的源。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak3.再输入以下命令打开sources.list配置文件更换源。
sudo vim/etc/apt/sources.list

//配置内容如下

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

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

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

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

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

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

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

deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse focal4.再输入命令更新源。
sudo apt-get update5.最后输入命令更新一下软件即可。
sudo apt-get upgrade大功告成。

页: [1]
查看完整版本: ubuntu20.04如何更换国内源