ubuntu 20.04 换源
时间: 2023-10-29 13:06:45 浏览: 105
好的,针对您的问题,您可以按照以下步骤来更换 Ubuntu 20.04 的软件源:
1.备份原有的软件源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2.打开软件源列表文件:
```
sudo vi /etc/apt/sources.list
```
3.将文件中的内容替换为以下内容:
```
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
```
4.保存并退出文件。
5.更新软件源列表:
```
sudo apt update
```
6.升级系统:
```
sudo apt upgrade
```
7.清理系统:
```
sudo apt autoremove
```
阅读全文