ubuntu18.04换百度源
时间: 2023-10-01 07:10:13 浏览: 81
Ubuntu18.04升级内核并安装AX210无线网卡驱动
要将Ubuntu 18.04更换为百度源,您可以按照以下步骤进行操作:
1. 打开终端,可以通过按下Ctrl+Alt+T键来快速打开终端。
2. 输入以下命令来编辑软件源列表文件:
```
sudo nano /etc/apt/sources.list
```
3. 在打开的文件中,找到以"deb"开头的行,这些行是指向Ubuntu软件源的地址。将这些行都注释掉(在行的前面添加一个"#"号),以便禁用它们。
4. 添加百度源。将以下行添加到文件的末尾:
```
deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
```
5. 保存并关闭文件。按下Ctrl+X,然后按Y键保存更改。
6. 更新软件包缓存。在终端中运行以下命令:
```
sudo apt update
```
7. 现在您的系统将使用百度源来下载软件包。您可以通过运行以下命令来安装软件包:
```
sudo apt install 软件包名称
```
请注意,在更换软件源之前,建议备份原始的软件源列表文件,以防止出现问题。上述步骤中提供的百度源链接是阿里云镜像,请根据实际情况选择合适的百度源链接。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [ubuntu18.04更换默认下载源为国内清华源、阿里源](https://blog.csdn.net/weixin_43059285/article/details/107900863)[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_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文