前言

由于linux系统自带的镜像源都在国外,国内用户下载或更新软件会比较慢,有时是非常慢,所以国内某些机构,如大学,研究院所,就在国内建了linux的镜像源服务器供国内linux用户使用,而我们要使用这些源,就要更改自己linux系统的更新源配置文件,接下来详述更新源操作步骤。

查找国内源

首先我们要找到国内的镜像源路径

阿里源

清华源

以清华源为例:

具体操作

1、选择自己的Ubuntu版本

注意,上图中是x86架构的源,如果非x86,应该修改https地址,根据经验,修改如下即可

https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/

具体请参考源说明。

2、备份源文件

# 后面地址需要更改
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

3、编辑文件

# 编辑文件
sudo vi /etc/apt/sources.list
#-----------内容-----------
#-----------ubuntu 21.04(hirsute)-----------
deb http://mirrors.aliyun.com/ubuntu hirsute main restricted
deb http://mirrors.aliyun.com/ubuntu hirsute-updates main restricted
deb http://mirrors.aliyun.com/ubuntu hirsute universe
deb http://mirrors.aliyun.com/ubuntu hirsute-updates universe
deb http://mirrors.aliyun.com/ubuntu hirsute multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-updates multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu hirsute-security main restricted
deb http://cn.archive.ubuntu.com/ubuntu hirsute-security universe
deb http://cn.archive.ubuntu.com/ubuntu hirsute-security multiverse#-----------ubuntu 清华大学-----------
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ hirsute-proposed main restricted universe multiverse
#-----------ubuntu 20.04(focal)-----------
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

更新

sudo apt update #更新软件列表
sudo apt upgrade # 更新本地软件

ubuntu:更新源操作步骤相关推荐

  1. ubuntu 更新源详细操作步骤

    由于linux系统自带的镜像源都在国外,国内用户下载或更新软件会比较慢,有时是非常慢,所以国内某些机构,如大学,研究院所,就在国内建了linux的镜像源服务器供国内linux用户使用,而我们要使用这些 ...

  2. ubuntu16.04 更新软件源 操作步骤

    由于linux系统自带的镜像源都在国外,国内用户下载或更新软件会比较慢,有时是非常慢,所以国内某些机构,如大学,研究院所,就在国内建了linux的镜像源服务器供国内linux用户使用,而我们要使用这些 ...

  3. Ubuntu 更新源方法

    安装完Ubuntu系统之后,面临的最主要的一个问题就是将apt安装源进行更新,因为在国内直接利用Ubuntu默认的安装源下载安装包速度慢,并且有的时候软件版本也比较旧.今天小编对Ubuntu更新源进行 ...

  4. Ubuntu更新源问题终于解决了

    Ubuntu更新源问题终于解决了 参考文章: (1)Ubuntu更新源问题终于解决了 (2)https://www.cnblogs.com/webnote/p/5767853.html 备忘一下.

  5. 如何设置停止更新支持的ubuntu更新源

    1.ubuntu更新源说明 ubuntu更新源的位置通常在 /etc/apt/sources.list 你可以通过任何工具修改它,它的内容形式一般是这样的 deb http://old-release ...

  6. Ubuntu换源操作+vim的下载

    我是在ubuntu2204中执行的换源操作,每个版本的源都是不同的,具体的源大家可以自行百度去操作,我在此分享我换源时的命令. 1:首先,打开终端输入 lsb_release -a 这个命令主要是为了 ...

  7. Ubuntu更新源以及搜狗输入法安装

    1.熟悉Ubuntu操作指令,以及更换更新源. 2.下载搜狗输入法使其能够正常操作. 第一步 打开终端 鼠标右键打开终端 第二步 找到你自己搜狗下载deb文件的位置,为了好找我把它放在了主目录下,输入 ...

  8. Docker容器内Ubuntu更新源失败/卡住的解决方法

    (1)首先更改为国内源镜像,在 /etc/apt路径下,先将sources.list文件进行备份. cp sources.list sources.list.bak 注:如果docker容器中没有gr ...

  9. [转载] 老版本ubuntu 更新源

    untu的普通版本支持的时间都有限,过了支持的时间,更新源都会被停用,比如ubuntu9.10原来的源都失效了(包括官方源,类似ustc的第 三方源,因为这些第三方源也是和官方源同步的).因此,直接用 ...

最新文章

  1. MySQL面试题 | 附答案解析(十七)
  2. python工具使用笔记
  3. 深入理解Spark 2.1 Core (七):Standalone模式任务执行的原理与源码分析
  4. SpringBoot笔记整理(二)
  5. git tag的使用
  6. 物联网卡得持续增长对企业带来怎样的挑战
  7. Spring MVC @JsonView注解使用
  8. atitit.修复xp 操作系统--重装系统--保留原来文件不丢失
  9. php 时间日期转为时间戳,PHP日期格式转时间戳
  10. 项目管理助力中国企业发展
  11. 自适应滤波器5-最小二乘法(LSM)
  12. Django学习笔记1 Web开发简介和Django安装运行
  13. Spring boot与Spring cloud
  14. 洛谷P2123 皇后游戏
  15. 格雷码算法c语言实验报告,算法设计与分析实验报告
  16. 杭州拱墅区委副书记、区长冯晶一行莅临利尔达参观调研
  17. HyperLynx(十八)DDR(一)DDR简介和DDR的数据仿真
  18. 亚马逊英国站产品审核要求英国代理人英代办理英国授权代表英代DOC符合性声明
  19. 编译原理实验一:词法分析程序设计与实现
  20. 小提琴和钢琴一起学行吗_小提琴和钢琴存在一种羁绊

热门文章

  1. 浪潮之巅,程序员如何拥抱新技术?
  2. sublime 下 解决Vintage模式下,normal 模式下中文输入的问题。
  3. EXCEL中用TEXT函数将文本转换成日期
  4. 高效的公式提取神器Mathpix snipping Tool+ Mathtype
  5. 1323: 三角形判定
  6. Actions as Moving Points
  7. 视频播放不流畅怎么办?使用CDN加速一步搞定!
  8. theano程序(一)
  9. SAP FICO - 简介(重要概念)
  10. 企业为什么要绘制用户画像?谈谈用户画像的真正作用