debian 搭建国内源
时间: 2023-10-15 14:06:37 浏览: 94
可以通过以下步骤在 Debian 中搭建国内源:
1. 备份原来的源列表:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
```
2. 打开 `/etc/apt/sources.list` 文件:
```
sudo nano /etc/apt/sources.list
```
3. 将原来的源地址注释掉,添加以下内容:
```
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
```
4. 保存并退出编辑器。
5. 更新源列表:
```
sudo apt update
```
现在,您已经在 Debian 中搭建了国内源。
阅读全文