ARM64架构ubuntu 18.04 server 换国内源
时间: 2023-10-10 19:08:49 浏览: 197
要在ARM64架构的Ubuntu 18.04 Server上更换国内源,您可以按照以下步骤进行操作:
1. 打开终端,以root用户或具有sudo权限的用户身份登录。
2. 备份原有的软件源配置文件:
```
cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
3. 编辑软件源配置文件:
```
nano /etc/apt/sources.list
```
4. 将原有的内容全部删除,然后将下面的内容粘贴到文件中:
```
# 阿里云源
deb [arch=arm64] http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb [arch=arm64] http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [arch=arm64] http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb [arch=arm64] http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
# 清华源
deb [arch=arm64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb [arch=arm64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb [arch=arm64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb [arch=arm64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
```
5. 按下Ctrl + X,然后按Y保存更改,然后按Enter键退出编辑器。
6. 更新软件源:
```
apt update
```
7. 现在您可以使用国内源进行软件包的安装和更新。
请注意,这里提供的是ARM64架构的软件源配置,确保您的设备是ARM64架构。如果您使用其他架构(如x86),请相应地修改软件源配置文件中的"arch"参数。
阅读全文