ubuntu18.04更换阿里源教程
时间: 2023-03-06 21:47:41 浏览: 389
阿里源教程:
1. 打开终端,输入“sudo gedit /etc/apt/sources.list”,然后按回车键打开sources.list文件。
2. 将sources.list文件中的所有内容替换为:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
3. 保存文件,然后输入“sudo apt-get update”,更新源。
相关问题
ubuntu18.04更换阿里源
要将Ubuntu 18.04更换为阿里源,您可以按照以下步骤进行操作:
1. 备份原来的系统默认源:打开终端,执行以下命令进行备份:
```
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
```
2. 打开源文件进行编辑:执行以下命令打开源文件:
```
sudo gedit /etc/apt/sources.list
```
3. 在gedit文本编辑器中,将下面的阿里源复制粘贴到源文件中:
```
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
```
4. 保存并关闭文件。
通过执行以上步骤,您已成功将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/BruceFei1/article/details/110312722)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [安装Ubuntu18.04及修改apt源为阿里云源](https://blog.csdn.net/weixin_46513495/article/details/113736829)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
ubuntu18.04 换阿里源
可以通过以下步骤将 Ubuntu 18.04 的软件源更换为阿里源:
1. 备份原有的软件源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2. 编辑软件源列表文件,将其中的内容替换为阿里源的地址:
```
sudo vim /etc/apt/sources.list
```
在编辑器中输入以下内容:
```
# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
```
3. 更新软件源列表:
```
sudo apt-get update
```
阅读全文