Ubuntu更换阿里云软件源
Ubuntu更换阿里云软件源
- 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.修改
sudo vim /etc/apt/sources.list
将source.list文件内容替换成下面的
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
- 更新
sudo apt-get update
reflink: https://yq.aliyun.com/articles/704603
Ubuntu更改apt源为国内更新源(或者软件源)方法早就有了,内容大同小异,我们应当掌握其规律了,其实每一版内容不同的地方就是版本号(或者官方一点的说:系统代号),所以我们先了解下新版本的系统代号:
使用命令:lsb_release -c
得到本系统的系统代号,如下图所示:
我们可以看到新版本的Ubuntu系统代号为bionic
同样的我们也可以得到之前任意版本的系统代号:
Ubuntu 12.04 (LTS)代号为precise。
Ubuntu 14.04 (LTS)代号为trusty。
Ubuntu 15.04 代号为vivid。
Ubuntu 15.10 代号为wily。
Ubuntu 16.04 (LTS)代号为xenial。
所以这也就解释了为什么利用搜索引擎搜出来的那么多方案里面内容不尽相同的原因,因为大家更改apt安装源时用的系统不一样。
一、首先备份Ubuntu系统的官方源文件
1、打开Ubuntu的命令终端,进入源文件 sources.list 所在的目录:
2、然后执行备份命令,执行 sudo cp sources.list sources.list.backup 对源文件内容进行备份,以防万一。
cd /etc/apt
sudo cp sources.list sources.list.backup
二、修改源文件内容
1、阿里源文件内容如下:
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
值得注意的是 sources.list 文件的条目都是有格式的(通过上面的内容大家也看的出来),一般有如下形式:
deb http://site.example.com/debian distribution component1 component2 component3
deb-src http://site.example.com/debian distribution component1 component2 component3
所以后面几个参数是对软件包的分类(Ubuntu下是main, restricted,universe ,multiverse这四个)
所以你把内容写成:
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed universe multiverse
上面之类的也是可以的,之前我有这个疑惑,所以在这里一并告知和我有一样疑惑的朋友。
2、将上述阿里源的文件内容全部复制,使用 sudo vim sources.list 打开文件,输入 ggdG(vim操作指令)删除所有内容(这句指令可以理解为删除第一行到最后一行的的全部内容)
sudo vim sources.list # 在 /etc/apt 目录下
ggdG # 使用vim打开 sources.list 文件后执行此命令
3、将复制的阿里源文件内容全部粘贴到文件中后,输入 : ——> wq 保存退出。
更新源
使用 sudo apt-get update 即可更新获取 阿里软件源 提供的软件列表
sudo apt-get update
更新软件
使用 sudo apt-get upgrade 即可跟新软件
sudo apt-get upgrade
reflink: https://www.linuxidc.com/Linux/2019-04/158158.htm
版本 |
别名(codename) |
发布日期 |
4.10 |
Warty Warthog(长疣的疣猪) |
2004年10月20日 |
5.04 |
Hoary Hedgehog(灰白的刺猬) |
2005年4月8日 |
5.10 |
Breezy Badger(活泼的獾) |
2005年10月13日 |
6.06 |
Dapper Drake(整洁的公鸭) |
2006年6月1日(LTS) |
6.10 |
Edgy Eft(急躁的水蜥) |
2006年10月6日 |
7.04 |
Feisty Fawn(坏脾气的小鹿) |
2007年4月19日 |
7.10 |
Gutsy Gibbon(勇敢的长臂猿) |
2007年10月18日 |
8.04 |
Hardy Heron(耐寒的苍鹭) |
2008年4月24日(LTS) |
8.10 |
Intrepid Ibex (勇敢的野山羊) |
2008年10月30日 |
9.04 |
Jaunty Jackalope(得意洋洋的怀俄明野兔) |
2009年4月23日 |
9.10 |
Karmic Koala(幸运的考拉) |
2009年10月29日 |
10.04 |
Lucid Lynx(清醒的猞猁) |
2010年4月29日 |
11.10 |
Oneiric Ocelot(梦幻的豹猫) |
2010年10月13日 |
11.04 |
Natty Narwhal(敏捷的独角鲸) |
2011年4月28日 |
12.04 |
Precise Pangolin(精准的穿山甲) |
2012年的4月26日(LTS) |
12.10 |
Quantal Quetzal(量子的绿咬鹃) |
2012年的10月20日 |
13.04 |
Raring Ringtail(铆足了劲的猫熊) |
2013年4月25日 |
13.10 |
Saucy Salamander(活泼的蝾螈) |
2013年10月17日 |
14.04 |
Trusty Tahr (可靠的塔尔羊) |
2014年4月18日 (LTS) |
14.10 |
Utopic Unicorn(乌托邦独角兽) |
2014年10月23日 |
15.04 |
Vivid Vervet (活泼的小猴) |
2015年4月 |
15.10 |
Wily Werewolf (狡猾的狼人) |
2015年10月 |
16.04 |
Xenial Xerus (好客的非洲地松鼠) |
2016年4月 (LTS) |
16.10 |
Yakkety Yak(牦牛) |
2016年10月 |
17.04 |
Zesty Zapus(开心的跳鼠) |
2017年4月 |
17.10 |
Artful Aardvark(机灵的土豚) |
2017年10月 |
18.04 |
Bionic Beaver(仿生海狸) |
即将发布2018年4月(LTS) |
Ubuntu 的版本支持时间
对于 desktop 版本和 server 版本,Ubuntu 会提供至少18个月的技术支持
对于 LTS 版本(Long Term Suppot)长期支持版本,desktop 版的会提供至少 3年技术支持,server 版本的会提供至少 5 年即使支持
Ubuntu 的各个版本 (最新发行版主要提供 Desktop 和 Server 两种版本)
Desktop版本:desktop 是 live cd 的名字,什么是 live cd? live cd 是一个刻录在光盘上的操作系统,我们并不需要硬盘就可以直接在光盘上运行这个操作系统。
里面也已经集成了很多软件,我们一般可以把这个系统安装到硬盘上,类似于ghost系统,安装速度会比较快。这个版本提供了向导的图形界面的方式,
让你一步步来轻松地安装 Ubuntu (一般都安装这个系统的 32 位 i386 版本)
Alternate版本:是一个最标准的安装版本,采用文本安装界面,里面有很多高级选项,可以安装 desktop ,也可以安装 server 版,适合比较高要求的人来安装,
安装速度比 desktop 版慢,但是运行时的效率比 desktop 版本快
Netbook版本:专门为上网本定制和优化,最近的版本采用了 Unity,为小屏幕提供了一种美观的用户界面,采用了大图标设计,让用户更容易寻找各种应用程序
DVD版本:里面包括 Desktop 和 Alternate 两种安裝模式,同时集成更多的软件和完整的语言包,假如你没有联网可以选择下这个版本
Minimal版本:安装 Ubuntu 的最小镜像版本
Ubuntu更换阿里云软件源相关推荐
- 【阿里云镜像】使用VM虚拟机安装OpenWRT并更换阿里云镜像源
文章目录 一.参考链接 二.OpenWRT简介 三.使用VM虚拟机安装OpenWRT操作步骤 1.下载OpenWRT.img镜像源 2.将.img镜像文件转换成.vmdk虚拟硬盘格式文件 (1)打开S ...
- ubuntu20.04更换阿里的软件源
新安装的ubuntu20.04的软件源是使用的国外的源,因此在使用apt安装软件时速度并不怎么快,建议大家更换为国内的源,这样在使用apt安装软件时速度会有明显的提升的. ubuntu20.04 ap ...
- Homebrew 更换阿里云镜像源
你可能有过这样糟糕的经历,当你满心欢喜的敲下 "brew install 应用名称",静静的等待安装结果的时候,Homebrew在 Updating Homebrew卡死了. Ho ...
- Anaconda Navigator卡logo打不开闪退问题处理方案-更换阿里云镜像源
最近有同事使用anaconda时出现了卡logo,显示loading applications,点击图标时发现闪退情况,当再次运行时会提示程序已经在运行中,因为部分应用已加载,可以打开任务管理器查看, ...
- ubuntu更换阿里云镜像源操作步骤
过程较为复杂,能清楚自己改了镜像源,避免了忘记或备份等 修改下载(镜像源)源 输入: sudo nano /etc/apt/sources.list 2.将所有deb 后的网址http://..... ...
- Ubuntu更换清华TUNA软件源
软件源配置文件 Ubuntu 的软件源配置文件是 /etc/apt/sources.list. 换源 使用以下命令查看Ubuntu版本: cat /proc/version 使用以下命令将/etc/a ...
- ubuntu 21.04 更换阿里云镜像源
备份原来的源 $ mv /etc/apt/sources.list /etc/apt/sources.list.bak $ vim /etc/apt/sources.list 添加如下内容 deb h ...
- Ubunt更换阿里云镜像源
1.切换到源文件所在目录 cd /etc/apt 2.备份之前的源文件 sudo cp sources.list sources.list.backup 3.替换源,将下边文件复制到sources.l ...
- Ubuntu更换阿里源和清华源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo vim /etc/apt/sources.list #阿里源 deb http ...
最新文章
- Delphi中使用IXMLHTTPRequest如何用POST方式提交带参
- android md风格Switch,带有图标动画和颜色转换的Switch – material...
- Scala模式匹配:对元组进行匹配
- Kafka设计解析(七)- Kafka Stream
- Chipmunk僵尸物理对象的出现和解决(七)
- iOS调用系统相册、相机 显示中文标题
- 在Twitter上使用Apache Mesos和Apache Aurora进行资源调度和任务启动
- java简单小项目_Java简易抽奖系统小项目
- Linux more和less
- Axure中使用fontawesome字体
- Unity3D中在Game视图调整屏幕大小,回到Scen视图发现游戏界面被改变了(解决方案)
- html iframe显示不全,滚动的iframe解决,但在iframe页面显示不全
- 粗糙集的概念和一些例子
- http请求头中Referer的含义和作用
- 前端小白初识CMD(dos窗口命令)
- 【owt-server】 只sync webrtc-m79并构建
- 重复测量数据多重填补 SAS code
- 罗生门:动荡时代下人性的恶与善
- MySQL从删库到跑路(7):连接查询,用联系的观点看女神与渣男
- SSD的王者 PCIe固态硬盘的未来在哪里