修改Ubuntu国内镜像源地址
目录
- 方法一
- 方法二
- 方法三
方法一
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国内镜像源地址相关推荐
- vagrant国内镜像源地址
vagrant国内镜像源地址 说明: Vagrant 可能会用到的国内镜像,通过国内镜像加速,大大提升 Vagrant 使用体验. Vagrant是非常优秀的本地虚拟化管理工具.无奈国内访问速度实在感 ...
- 收藏的一些国内镜像源地址
国内镜像源地址 清华大学 : https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云: http://mirrors.aliyun.com/pypi/simple/ ...
- docker官方镜像修改为国内镜像
参考:https://www.cnblogs.com/icebutterfly/p/9489133.html 使用docker拉取镜像时,会出现链接超时错误.因为官方镜像访问速度太慢,所以报错,修改为 ...
- mac下Intelij IDEA中修改maven国内镜像
IDEA默认的maven下载地址:https://repo.maven.apache.org/maven2 下载maven的依赖包非常的慢,现在需要修改为国内的镜像,这样下载就很快. 第一步:找到ma ...
- 【202211】国内镜像源地址
Ubuntu.Python.Nodejs.MySQL.Git.Chromium.Docker.Homebrew 等一系列的常用最推荐的镜像源. 清华源镜像 清华大学开源软件镜像站 | Tsinghua ...
- CentOS国内镜像源地址汇总持续更新
欢迎关注我的 微信公众号:破壳Ai,分享最佳学习路径.教程和资源.成长路上,有我陪你. 文章目录 下载地址 镜像源 版本说明 官方文件说明 下载地址 CentOS 官方下载地址:https://www ...
- composer修改成国内镜像
因为composer安装包数据是从github.com上下载的,安装包的源数据从packagist.org上下载 作为两个国外的网站,连接速度会很慢,而且很有可能网站被墙. 所以composer中国全 ...
- 阿里云ubuntu软件包镜像源地址
https://mirrors.aliyun.com/ubuntu/dists/
- UBuntu国内镜像地址下载
http://www.oschina.net/p/ubuntu http://releases.ubuntu.com/ http://mirrors.163.com/ubuntu-releases/1 ...
最新文章
- linux第七章《档案与目录管理》重点回顾
- 堆栈,静态变量和普通变量,静态函数和普通函数的区别
- 《强化学习周刊》第39期:近似最优深度、多智能体广义、角色动画强化学习...
- kotlin使用spring data jpa(一)
- 安装pypcap = 安装flex:the fast lexical analyser + 安装libpcap-1.7.4
- Useful “ifconfig” Commands to Configure Network Interface in Linux
- linux性能评估-内存基础理解篇
- ArcGIS Server,rest路径输入要素json 格式描述
- IOCP 写服务程序时的关键问题研究[转]
- php框架原理 php初识,初识PHP
- oracle字体库 生僻字,繁难字库生僻字大全-找字网_免费字体下载、字体在线商用授权、ttf字体分享、专业字体网站!...
- webservice 框架比较
- ExcelWriter 导出excel
- 5分绩点转4分_5分GPA3.7转化成4分制大概是多少了
- 搬:五大车载操作(VOS)系统优劣对比,车载系统架构分析
- android游戏开发实例-可局域网对战的飞行棋(二)
- idea自动更新IDE Eval Reset插件安装
- 汉诺塔(C语言实现)
- CPS模式是如何降低网络营销投入的?
- MYSQL 根据身份证号找出年龄大于60岁的人