目录

  • 方法一
  • 方法二
  • 方法三

方法一

Ubuntu可视化界面修改
在设置中的软件和更新中修改红框内容即可,修改后关闭会提示重启服务选择它即可

方法二

修改源文件
位置:/etc/apt/sources.list
首先备份以便出错后还原:sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak
再修改
下面是sources.list文件内容

# deb cdrom:[Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)]/ focal main restricted# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partnerdeb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

修改完成后保存退出
更新软件包列表:sudo apt-get update
升级软件包:sudo apt-get upgrade

方法三

需用https的时候(使用上面两种可能会报错)
我使用的清华镜像:https://mirrors.tuna.tsinghua.edu.cn/

讲的还是很详细的

我这里贴出来Ubuntu20.04 LTS的/etc/apt/sources.list内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

修改Ubuntu国内镜像源地址相关推荐

  1. vagrant国内镜像源地址

    vagrant国内镜像源地址 说明: Vagrant 可能会用到的国内镜像,通过国内镜像加速,大大提升 Vagrant 使用体验. Vagrant是非常优秀的本地虚拟化管理工具.无奈国内访问速度实在感 ...

  2. 收藏的一些国内镜像源地址

    国内镜像源地址 清华大学 : https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云: http://mirrors.aliyun.com/pypi/simple/ ...

  3. docker官方镜像修改为国内镜像

    参考:https://www.cnblogs.com/icebutterfly/p/9489133.html 使用docker拉取镜像时,会出现链接超时错误.因为官方镜像访问速度太慢,所以报错,修改为 ...

  4. mac下Intelij IDEA中修改maven国内镜像

    IDEA默认的maven下载地址:https://repo.maven.apache.org/maven2 下载maven的依赖包非常的慢,现在需要修改为国内的镜像,这样下载就很快. 第一步:找到ma ...

  5. 【202211】国内镜像源地址

    Ubuntu.Python.Nodejs.MySQL.Git.Chromium.Docker.Homebrew 等一系列的常用最推荐的镜像源. 清华源镜像 清华大学开源软件镜像站 | Tsinghua ...

  6. CentOS国内镜像源地址汇总持续更新

    欢迎关注我的 微信公众号:破壳Ai,分享最佳学习路径.教程和资源.成长路上,有我陪你. 文章目录 下载地址 镜像源 版本说明 官方文件说明 下载地址 CentOS 官方下载地址:https://www ...

  7. composer修改成国内镜像

    因为composer安装包数据是从github.com上下载的,安装包的源数据从packagist.org上下载 作为两个国外的网站,连接速度会很慢,而且很有可能网站被墙. 所以composer中国全 ...

  8. 阿里云ubuntu软件包镜像源地址

    https://mirrors.aliyun.com/ubuntu/dists/

  9. UBuntu国内镜像地址下载

    http://www.oschina.net/p/ubuntu http://releases.ubuntu.com/ http://mirrors.163.com/ubuntu-releases/1 ...

最新文章

  1. linux第七章《档案与目录管理》重点回顾
  2. 堆栈,静态变量和普通变量,静态函数和普通函数的区别
  3. 《强化学习周刊》第39期:近似最优深度、多智能体广义、角色动画强化学习...
  4. kotlin使用spring data jpa(一)
  5. 安装pypcap = 安装flex:the fast lexical analyser + 安装libpcap-1.7.4
  6. Useful “ifconfig” Commands to Configure Network Interface in Linux
  7. linux性能评估-内存基础理解篇
  8. ArcGIS Server,rest路径输入要素json 格式描述
  9. IOCP 写服务程序时的关键问题研究[转]
  10. php框架原理 php初识,初识PHP
  11. oracle字体库 生僻字,繁难字库生僻字大全-找字网_免费字体下载、字体在线商用授权、ttf字体分享、专业字体网站!...
  12. webservice 框架比较
  13. ExcelWriter 导出excel
  14. 5分绩点转4分_5分GPA3.7转化成4分制大概是多少了
  15. 搬:五大车载操作(VOS)系统优劣对比,车载系统架构分析
  16. android游戏开发实例-可局域网对战的飞行棋(二)
  17. idea自动更新IDE Eval Reset插件安装
  18. 汉诺塔(C语言实现)
  19. CPS模式是如何降低网络营销投入的?
  20. MYSQL 根据身份证号找出年龄大于60岁的人

热门文章

  1. 线代第五章 特征值和特征向量 复习笔记
  2. 聚焦落地应用与商业前景,2018年国内人脸识别应用TOP10排行榜
  3. linux ps vsz malloc,Linux proc 内存
  4. 糖尿病不控制,老王后悔莫及
  5. 机器学习之朴素贝叶斯方法(Naive Bayes)原理和实现
  6. java合并两个set_Java中合并两个集合的方法
  7. 创业想法与创业实践的关系:空有想法一文不值!
  8. Xh_CMS渗透测试文档
  9. miniui图片附件上传回显
  10. 鹏宇成Revit族库管理器RevitFamily2013