安装好ubuntu之后,我们要进行换成国内源,可以提高我们安装其他软件的速度,这里推荐大家换成清华源,稳定可靠

1.先把之前的默认源备份一下

sudo  cp  /etc/apt/sources.list  /etc/apt/sources.list.backup

2.打开源文件

sudo gedit /etc/apt/sources.list

删除里面原来的内容,换成清华源。点击此处跳转可以选择清华源的版本,将对应ubuntu版本的内容复制进来。

  1. 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
  1. 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 镜像源为国内源相关推荐

  1. 修改Ubuntu镜像源

    修改Ubuntu镜像源 备份原来的镜像源 $> cd /etc/apt $> cp sources.list sources.list.bak 清空sources.list文件 $> ...

  2. 更换Ubuntu默认源为国内源

    安装Ubuntu后,使用国外源太慢了,修改为国内源会快很多. 1.修改过程 1.1 备份 备份/etc/apt/sources.list,命令如下: sudo cp /etc/apt/sources. ...

  3. Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源

    Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源 内有很多Ubuntu的镜像源,包括阿里的.网易的,还有很多教育网的源,比如:清华源.中科大源. 我们这里以中科大的源为例讲解如何修 ...

  4. 九阴白骨爪(1)修改APT源为国内源的懒人法

    九阴白骨爪(1)修改APT源为国内源的懒人法 最近搞了一个电信的云主机,把自己做的一个小系统放了上去.由于我以前没有写过B/S架构的东西,这是第一次,所以从开发到部署遇到N多的坑.现在把这些悲惨的遭遇 ...

  5. Docker 更换镜像内部的软件源为国内源(apt-get源)

    Docker 更换镜像内部的软件源为国内源(apt-get源) 1.查看镜像内部的软件源 2.查看系统版本 3.更换软件源 3.1 在镜像内部更换 3.2用Dockerfile构建时更换 1.查看镜像 ...

  6. ubuntu 18.04 LTS 国内源安装docker

    ubuntu 18.04 LTS 国内源安装docker 检查系统内核版本 $uname -r 4.15.0-42-generic 修改apt国内源为中科大源 sudo cp /etc/apt/sou ...

  7. Ubuntu 18.04换国内源

    2019独角兽企业重金招聘Python工程师标准>>> 参考文档: https://blog.csdn.net/zhangjiahao14/article/details/80554 ...

  8. 树莓派 11 bullseye镜像官方源和国内源

    树莓派(CM4) 11 bullseye镜像官方源和国内源 ​ 官方源 /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbi ...

  9. 一、在windows环境下修改pip镜像源的方法(以python3为例)

    在windows环境下修改pip镜像源的方法(以python3为例) 1.在windows文件管理器中,输入 %APPDATA% 2.会定位到一个新的目录下,在该目录下新建pip文件夹,然后到pip文 ...

最新文章

  1. .netcore下的微服务、容器、运维、自动化发布
  2. 学习一下戴戒指的含义[转]
  3. 修改oracle用户密码永不过期
  4. 华为交换机基本配置命令
  5. 360安全卫士 免杀
  6. 信息安全技术及应用 互联网安全协议
  7. matlab数缺失值填充,matlab缺失值填补
  8. 谷歌浏览器帮助用户在安装前识别不受信任的扩展
  9. Windows多媒体开发框架介绍
  10. 数采仪厂家_环保数采仪生产厂家
  11. TM1637四位数码管驱动
  12. maximo开发经验
  13. 015 Django 云笔记项目(可以略过)
  14. 玉米社:抖音作品几大核心指标,完播率、点赞率、吸粉率多少算好?
  15. Python 汉字转拼音库 pypinyin, 附:汉字拼音转换工具
  16. 什么是write-allocate policy?
  17. 初中生也能看懂的狭义相对论(1.世界是什么?)(原子,质子和分子)(看不懂算我输)
  18. GUI设计和UI设计有什么区别?
  19. HashMap引发死链问题(HashMap、ConcurrentHashMap原理解析)
  20. 恬淡,禅意里开出的花

热门文章

  1. 做好年会PPT,只需学会这三点
  2. linux命令大全(完善中)
  3. ARM开发板,ARM方案定制,嵌入式产品开发,深圳瑞芯微方案商,rk3288主板,rk3399主板
  4. 教你避免心爱的本本遭遇致命伤
  5. vivo分屏_科技怎样应用在生活中?vivo分屏+Jovi语音助手=高效学习体验
  6. ABP .NET Core 菜单配置与授权
  7. 可持续女性人物100特展盛大开启 ——《LOHAS乐活》Green Women Power 100
  8. SAP MDG —— 系统先导配置
  9. 业内领跑的联盟营销网站如何获得优质流量?
  10. TMM软件测试成熟度模型