ubuntu sourcelist aliyun 20.04
时间: 2023-07-11 20:43:24 浏览: 80
aliyun-sources.list
要将Ubuntu 20.04的源列表更改为阿里云镜像,请按照以下步骤进行操作:
1.备份默认的源列表:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
```
2.编辑源列表文件:
```
sudo nano /etc/apt/sources.list
```
3.将以下内容复制并粘贴到文件中:
```
#阿里云镜像源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
#Canonical合作伙伴和商业软件源
deb http://archive.canonical.com/ubuntu/ focal partner
deb-src http://archive.canonical.com/ubuntu/ focal partner
```
4.保存并退出文件,然后更新软件包列表:
```
sudo apt update
```
现在,您的Ubuntu 20.04源列表已更改为阿里云镜像源。
阅读全文