ubuntu 18.04换源
时间: 2023-09-05 10:09:41 浏览: 135
Android8.1.0安卓源码编译
你可以通过以下步骤来更换Ubuntu 18.04的源:
1. 备份源列表文件:打开终端,输入以下命令备份源列表文件。
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
```
2. 打开源列表文件并修改:使用文本编辑器打开源列表文件。
```
sudo nano /etc/apt/sources.list
```
3. 在源列表文件中注释掉原有的源,并添加新的源。你可以选择使用国内的源,例如清华大学的源(即TUNA源)。在源列表文件中添加以下内容:
```
# 清华大学源
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. 保存更改并退出文本编辑器。
5. 更新源列表和软件包信息。在终端中运行以下命令来更新源列表和软件包信息。
```
sudo apt update
```
现在,你的Ubuntu 18.04系统应该已成功更换为新的源。这样可以提高终端下载速度。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Ubuntu18.04换源](https://blog.csdn.net/qq_58011370/article/details/124598788)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Ubuntu18.04 更换源](https://blog.csdn.net/qq_19004627/article/details/102967909)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文