ubuntu清华安装源
时间: 2025-01-28 20:09:32 浏览: 60
### 如何在 Ubuntu 系统上设置清华大学镜像源
为了提高软件包下载速度并获得更稳定的连接,在 Ubuntu 中配置清华大学的镜像源是一个不错的选择。
#### 修改APT源列表文件
编辑 `/etc/apt/sources.list` 文件,使用文本编辑器打开此文件:
```bash
sudo nano /etc/apt/sources.list
```
删除原有内容并将下面对应版本的内容粘贴进去。假设当前使用的Ubuntu版本为20.04 (Focal Fossa),则应输入如下内容[^1]:
```plaintext
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
```
对于其他版本,请替换上述URL中的 `focal` 关键字为对应的代号名称,如bionic代表18.04, xenial表示16.04等。
完成修改后保存文件退出编辑器。
#### 更新本地软件索引库
为了让更改生效,需执行命令刷新本地缓存:
```bash
sudo apt update
```
这一步骤会从新的清华镜像站点获取最新的软件包信息。
之后就可以正常使用apt工具来安装所需的应用程序了。
阅读全文
相关推荐
















