Ubuntu 18.04清华镜像源
时间: 2023-09-02 20:11:42 浏览: 132
修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法
5星 · 资源好评率100%
Ubuntu 18.04的清华镜像源可以使用以下命令进行设置:
1.备份原有的源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2.编辑源列表文件:
```
sudo nano /etc/apt/sources.list
```
3.在文件中添加以下内容(请根据自己的位置选择镜像源):
```
#清华大学镜像源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
```
4.保存并退出文件,然后运行以下命令更新源:
```
sudo apt update
```
5.更新软件包:
```
sudo apt upgrade
```
阅读全文