ubuntu20.10换源
时间: 2023-12-09 14:36:47 浏览: 219
要在Ubuntu 20.10上更改软件源,可以按照以下步骤进行操作:
1.备份当前的软件源列表,以防出现问题:
```shell
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2.打开软件源列表文件:
```shell
sudo vi /etc/apt/sources.list
```
3.将默认的软件源地址注释掉,添加阿里源或清华源的地址。以阿里源为例,可以在文件末尾添加以下内容:
```shell
# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse
```
4.保存并退出文件。
5.更新软件源:
```shell
sudo apt-get update
```
6.升级系统:
```shell
sudo apt-get upgrade
```
阅读全文