修改 ubuntu 镜像源为国内源
安装好ubuntu之后,我们要进行换成国内源,可以提高我们安装其他软件的速度,这里推荐大家换成清华源,稳定可靠
1.先把之前的默认源备份一下
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
2.打开源文件
sudo gedit /etc/apt/sources.list
删除里面原来的内容,换成清华源。点击此处跳转可以选择清华源的版本,将对应ubuntu版本的内容复制进来。
- ubuntu 16.04 对应的清华源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
- ubuntu 18.04 对应的清华源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
3.换源完成后保存退出并在终端输入指令更新
sudo apt-get update
4.运行完 3 中的指令可能会报错如下
解决办法
终端输入指令:
sudo apt-get purge libappstream3
然后重新执行:
sudo apt-get update
换源成功!!!
修改 ubuntu 镜像源为国内源相关推荐
- 修改Ubuntu镜像源
修改Ubuntu镜像源 备份原来的镜像源 $> cd /etc/apt $> cp sources.list sources.list.bak 清空sources.list文件 $> ...
- 更换Ubuntu默认源为国内源
安装Ubuntu后,使用国外源太慢了,修改为国内源会快很多. 1.修改过程 1.1 备份 备份/etc/apt/sources.list,命令如下: sudo cp /etc/apt/sources. ...
- Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源
Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源 内有很多Ubuntu的镜像源,包括阿里的.网易的,还有很多教育网的源,比如:清华源.中科大源. 我们这里以中科大的源为例讲解如何修 ...
- 九阴白骨爪(1)修改APT源为国内源的懒人法
九阴白骨爪(1)修改APT源为国内源的懒人法 最近搞了一个电信的云主机,把自己做的一个小系统放了上去.由于我以前没有写过B/S架构的东西,这是第一次,所以从开发到部署遇到N多的坑.现在把这些悲惨的遭遇 ...
- Docker 更换镜像内部的软件源为国内源(apt-get源)
Docker 更换镜像内部的软件源为国内源(apt-get源) 1.查看镜像内部的软件源 2.查看系统版本 3.更换软件源 3.1 在镜像内部更换 3.2用Dockerfile构建时更换 1.查看镜像 ...
- ubuntu 18.04 LTS 国内源安装docker
ubuntu 18.04 LTS 国内源安装docker 检查系统内核版本 $uname -r 4.15.0-42-generic 修改apt国内源为中科大源 sudo cp /etc/apt/sou ...
- Ubuntu 18.04换国内源
2019独角兽企业重金招聘Python工程师标准>>> 参考文档: https://blog.csdn.net/zhangjiahao14/article/details/80554 ...
- 树莓派 11 bullseye镜像官方源和国内源
树莓派(CM4) 11 bullseye镜像官方源和国内源 官方源 /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbi ...
- 一、在windows环境下修改pip镜像源的方法(以python3为例)
在windows环境下修改pip镜像源的方法(以python3为例) 1.在windows文件管理器中,输入 %APPDATA% 2.会定位到一个新的目录下,在该目录下新建pip文件夹,然后到pip文 ...
最新文章
- .netcore下的微服务、容器、运维、自动化发布
- 学习一下戴戒指的含义[转]
- 修改oracle用户密码永不过期
- 华为交换机基本配置命令
- 360安全卫士 免杀
- 信息安全技术及应用 互联网安全协议
- matlab数缺失值填充,matlab缺失值填补
- 谷歌浏览器帮助用户在安装前识别不受信任的扩展
- Windows多媒体开发框架介绍
- 数采仪厂家_环保数采仪生产厂家
- TM1637四位数码管驱动
- maximo开发经验
- 015 Django 云笔记项目(可以略过)
- 玉米社:抖音作品几大核心指标,完播率、点赞率、吸粉率多少算好?
- Python 汉字转拼音库 pypinyin, 附:汉字拼音转换工具
- 什么是write-allocate policy?
- 初中生也能看懂的狭义相对论(1.世界是什么?)(原子,质子和分子)(看不懂算我输)
- GUI设计和UI设计有什么区别?
- HashMap引发死链问题(HashMap、ConcurrentHashMap原理解析)
- 恬淡,禅意里开出的花