Ubuntu18.04下更改apt源为阿里云源

前言:看见Ubuntu新出了18.04版本感觉不错,装一个玩玩,虽然有很多教程可以参考,但我也给出一个不是很一样的方案吧,尽量解释的详细一点。为了下载更方便,速度更快,我们往往在使用Linux系列系统时修改apt源为国内的源,一般选择有阿里云,豆瓣之类的,下面简单说下如何更改为阿里云源。1.复制源文件备份,以防万一我们要修改的文件是sources.list,它在目录/etc/ap...
摘要由CSDN通过智能技术生成

前言:看见Ubuntu新出了18.04版本感觉不错,装一个玩玩,虽然有很多教程可以参考,但我也给出一个不是很一样的方案吧,尽量解释的详细一点。

为了下载更方便,速度更快,我们往往在使用Linux系列系统时修改apt源为国内的源,一般选择有阿里云,豆瓣之类的,下面简单说下如何更改为阿里云源。

 

1.复制源文件备份,以防万一

我们要修改的文件是sources.list,它在目录/etc/apt/下,sources.list是包管理工具apt所用的记录软件包仓库位置的配置文件,同样类型的还有位于 同目录下sources.list.d文件下的各种.list后缀的各文件。

命令如下:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

 

2.编辑源列表文件

命令如下:

sudo vim /etc/apt/sources.list

如果报错:sudo:vim:command not found    说明没装vim编辑器

使用命令:

sudo apt-get install vim 安装即可

 

3.查看新版本信息

其实Ubuntu18.04版之前的任一版更改apt源为国内源方法早就有了,内容大同小异,我们应当掌握其规律了,其实每一版内容不同的地方就是版本号(或者官方一点的说:系统代号),所以我们先了解下新版本的系统代号:

使用如下命令:

lsb_release -c

  • 380
    点赞
  • 661
    收藏
    觉得还不错? 一键收藏
  • 38
    评论
要将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 ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 38
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值