ubuntu镜像源切换

换源准备:

换源之前明确使用平台,X86架构、ARM架构的源,ubuntu18.04和unbuntu16.04等源均不同,切忌病急乱投医,看到一个源复制过来添加后没用。

分析一条源:

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/bionic-updates main restricted universe multiverse

从左到又依次为:

镜像网址:http://mirrors.tuna.tsinghua.edu.cn

计算机架构对应关系:

计算机架构 代号
X86 ubuntu
ARM ubuntu-ports

系统版本号对应关系:

版本 版本号 代号
Lucid(10.04) 10.04 lucid
Precise(12.04) 12.04 precise
Trusty(14.04) 14.04 trusty
Utopic(14.10) 14.10 utopic
Ubuntu 16.04 TLS 16.04 xenial
Ubuntu 18.04 TLS 18.04 bionic

综上TX2(18.04系统版本)的一条更新格式为

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse

换源步骤

1.获得root权限

sudo su

2.打开源配置文件

gedit /etc/apt/sources.list

3.删除原来的文件并且换成自己想换的源

#清华的源(ARM)

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main universe restricted

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main universe restricted

#阿里源(x86)

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb 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 main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

4.更新软件列表

apt update

5.更新软件包

apt upgrade

附组件:

main: 免费,Ubuntu 官方维护的自由软件;
restricted: 不免费,但是正规支持的,一般是设备专有驱动;
universe:免费,社区维护的自由软件;
multiverse:不免费,无正规支持,非自由软件;
security:重要的安全更新;
updates:非安全性更新,即不影响到系统安全的 bug 修补;
proposed:预更新,小 beta 版,过后会进入[updates]或[security];
backports:新软件的反向导出,新软件为老系统编译的版本;

组件参考:http://www.voidcn.com/article/p-zctkgwyc-bsd.html

版本

原文地址:https://www.cnblogs.com/liptom/p/12155870.html

时间: 2024-07-31 14:32:39

ubuntu镜像源切换的相关文章

ubuntu14 添加本地镜像源

概述 说了centos的epel源搭建方式后,在说下ubuntu镜像源及openstack本地源的搭建. 步骤 1.安装apt-mirror #apt-get install apt-mirror 2.手动建立/apt/ubuntu目录,并修改/etc/apt/mirror.list,添加如下内容: ############# config ################## # # set base_path    /var/spool/apt-mirror   set base_path 

Ubuntu的切换国内镜像源,提升apt-get速度

原文引用https://www.dazhuanlan.com/2019/08/25/5d6228d8dd6fb/ 查找适合自己系统的镜像源配置 博主这里使用的是清华大学的镜像源,大家可以进入清华大学镜像源官网,选择自己的系统,复制相应的配置文字. 在命令行下修改配置文档 首先,进入/etc/apt目录,为了防止新手出错,对原配置文档进行一份备份,然后用vim或者gedit工具打开sources.list文档,将原内容删除,替换为新的配置内容.全部命令如下: 123 cd /etc/aptsudo

十分钟内在Ubuntu系统上搭建Mono开发环境(Mono软件Ubuntu系统国内镜像源、Mono国内镜像源)

Mono软件Ubuntu系统国内镜像源.Mono国内镜像源 http://download.githall.cn/repo 1.授权注册repo源 Ubuntu 18.04 (i386, amd64, armhf, arm64, ppc64el)系统请运行如下命令: sudo apt install gnupg ca-certificates sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0

yarn (npm) 切换设置镜像源

设置镜像源 1.查看一下当前源 yarn config get registry 2.切换为淘宝源 yarn config set registry https://registry.npm.taobao.org 3.或者切换为自带的 yarn config set registry https://registry.yarnpkg.com 原文地址:https://www.cnblogs.com/momozjm/p/10635941.html

Ubuntu 更新国内镜像源失败

Ubuntu 更新国内镜像源失败 首先打开系统原来的/etc/apt/sources.list 查看,原来的仓库地址是 https 还是 http 如果是http那么说明本机的 CA 证书有问题,运行命令sudo apt-get install apt-transport-https ca-certificates 更新,这样就可以使用国内的 htpps 镜像源 如果是http 那么也可以选择使用 http 的国内镜像源 运行 sudo apt-get update 来更新 原文地址:https

利用国内镜像源下载、编译Android源码

在国内下载Android可是不太容易,不过从Google断断续续地下载了几天源码后发现清华大学有个TUNA镜像源可以下载Android源码,甚是方便. 参考网站: http://source.android.com/index.html https://aosp.tuna.tsinghua.edu.cn/ 一.环境准备: 现在Android源码的下载和编译在Linux和Mac OS上都可以了,但Mac OS上设置略微复杂点,所以我选择了Ubuntu 14.04 64位的虚拟机.(硬盘建议50G以

搭建本地Ubuntu 镜像服务器

一.需求分析能不能在局域网搭建一个Ubuntu 镜像服务器,这样作的好处是可以节省Ubuntu某些常用工具的安装时间. 二.部署过程 2.1 测试环境目前在公司内有一台能连接到外网的Ubuntu机器, IP : 192.168.8.173 ,Ubuntu版本为Ubuntu 9.04 i686. 2.2 搭建步骤为了创建Ubuntu mirror 服务器,最少需要60G硬盘空间,Ubuntu每个版本都有32 bit和64 bit两个版本,有两组deb包.当然可以创建Ubuntu一个版本的32 bi

ubuntu 更新源 或者 apt-get install 出错404 not found ,Failed to fetch

1.考虑是不是能上网 2.用apt-get update ,然后再试试apt-get install 如果apt-get update 也出现很多 404 not found 或者 failed to fetch ,就要考虑更换自己的源,百度搜 /etc/apt/sources.list 3.如果还不行,估计是Ubuntu版本太老了,没有维护的了. 比如我用11.04,sudo apt-get install open-vm-dkms 不行,sudo apt-get  update  不行,就死

ubuntu 的源

不知道为啥ubuntu12.10 进行 apt-get update的时候总是404 我想应该是源出了点问题,于是我切换了整个源,国内外,教育网公网都试了,可是问题依然存在 可能是ubuntu12.10停止更新的原因吧,最终还是没能更新- 最后我又装了一个虚拟机,ubuntu14.04的,LTS长期更新的那种-我应该有两个电脑才好对吧-   要查看源的地址:http://wiki.ubuntu.org.cn/Qref/Source 官方的东西,挺全的   我个人使用的是 163的那个-速度挺快的