ubuntu18.4版本的更新源
时间: 2023-10-29 17:07:52 浏览: 92
Ubuntu 18.04 的更新源可以通过以下步骤进行更改:
1. 打开终端(Ctrl+Alt+T)。
2. 输入以下命令备份原来的源列表文件(sources.list):
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
```
3. 打开源列表文件:
```
sudo nano /etc/apt/sources.list
```
4. 在文件中找到以下行:
```
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
```
5. 将以上行改为以下行:
```
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe
deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-security universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse
```
6. 保存文件并退出(Ctrl+X,Y,Enter)。
7. 更新源列表:
```
sudo apt update
```
现在,您的 Ubuntu 18.04 系统将使用阿里云的软件源来更新和安装软件包。
阅读全文