Ubuntu16.04、18.04换清华源

  • 1. 原文件备份
  • 2. 修改源文件
  • 3. 更新源

1. 原文件备份

apt源的设置在/etc/apt/sources.list中,我们首先备份一下:

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

2. 修改源文件

打开源文件

sudo gedit /etc/apt/sources.list

将内容替换为如下:
Ubuntu16.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

Ubuntu18.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 updatesudo apt-get upgrade

Ubuntu16.04、18.04换清华源相关推荐

  1. 从无到有 Ubuntu16.04 18.04 20.04安装+Todesk+Chrome+NVIDIA驱动+CUDA+Cudnn+Anaconda3+Pycharm 超详细教程+踩坑问题

    从无到有 Ubuntu16.04 18.04 20.04安装+Todesk+Chrome+NVIDIA驱动+CUDA+Cudnn+Anaconda3+Pycharm 超详细教程+踩坑问题(有部分图片忘 ...

  2. 【Linux】ubuntu16.04/18.04安装I219-V有线网卡驱动

    intel219网卡的linux驱动,ubuntu16.04/18.04安装I219-V有线网卡驱动问题解决方法(示例代码) 安装ubuntu16.04/18.04 LTS后无网络连接的解决方法: 1 ...

  3. ubuntu16.04/18.04安装卸载cuda10.0/10.1和cudnn图文说明

    ubuntu16.04/18.04安装卸载cuda10.0/10.1和cudnn图文说明 前言 一.安装cuda10.0 1.官网下载cuda安装文件 2.开始安装cuda10.0 二.安装cuda1 ...

  4. Ubuntu安装飞书——Ubuntu16.04/18.04/20.04/22.04

    Ubuntu安装飞书 安装包下载 安装方式 方式一:运行安装包安装 方式二:终端命令安装 通过以下教程可以快速的安装飞书,本教程适用于Ubuntu16.04/18.04/20.04/22.04 安装包 ...

  5. Ubuntu 16.04/18.04/20.04/deepin v20安装insight的方法

    Ubuntu 16.04/18.04/20.04/deepin v20安装Insight实现汇编的调试 由于Ubuntu从9.04开始就把Insight从APT源中删除,所以使用APT无法安装.参考网 ...

  6. 【树莓派换清华源 】 armv7l bullseye

    项目场景: 树莓派换清华源 解决方案: 1 找到自己树莓派的版本 uname -mlsb_release -a 如图可以看见我的版本 2 然后我们需要修改两个文件 2.1 进入/etc/apt/sou ...

  7. 如何在Ubuntu 20.04 / 18.04服务器中进入救援模式或紧急模式?

    我们在使用香港服务器www.a5idc.net时,难免遇到用户忘记登录密码或系统遭受文件系统损坏的情况.当这种情况发生时,建议的解决方案是启动进入救援或应急模式,并应用所需的修复措施. 救援模式也被称 ...

  8. Linux拉取yarn配置文件,如何在 Ubuntu 16.04/18.04 上安装 Yarn

    在本教程中,我们将向您展示如何在 Ubuntu 16.04 或 Ubuntu 18.04 系统上安装 Yarn. 什么是Yarn? Yarn 是一个代码的包管理器. 它允许您与世界各地的其他开发人员一 ...

  9. 树莓派基本配置+换清华源

    从0开始在树莓派中部署openvino+yolov3----1 目录 从0开始在树莓派中部署openvino+yolov3----1 一.烧入树莓派系统 二.安装树莓派系统 三.登录树莓派 四.换清华 ...

最新文章

  1. Java数组的初始化
  2. 关于.net实现网站模板机制(非标签替换)
  3. [精华][推荐]CAS SSO单点登录服务端客户端学习
  4. hdu4585 STL水题
  5. Swift之深入分析字典的下标访问方法的源码调试和汇编实现
  6. 【渝粤题库】陕西师范大学201691 日语(二) 作业
  7. 【Flink】ProcessFunction:Flink最底层API使用教程
  8. [二分][贪心]JZOJ P3996 Sabotage
  9. STM32正交编码器驱动电机
  10. 一天已不足24小时?一年不足365天?求每年元旦为周几的公式还能用吗?(标题党石锤了)
  11. python如何下载tushare_如何安装tushare
  12. 新手入门刷题(专题二)排序 (第一部分)
  13. SSRS 锁定标题栏
  14. 三天打鱼两天晒网问题
  15. Linux proc目录详解
  16. python学习——oop-python面向对象,类相关基础
  17. 绘制CAD图纸的过程中CAD快捷键失灵了怎么办?
  18. vue 如何调用微信分享_Vue项目通过JSSDK调用微信分享接口
  19. NEC Programming Contest 2021(AtCoder Beginner Contest 229) B - Hard Calculation
  20. R语言学习-基础篇1

热门文章

  1. 含有参数的sql拼接_深入讲解SQL中的字符串拼接
  2. highcharts 一图绘制多条线
  3. android imageview图片失真,imageView 图片变形失真
  4. Android 头像上传
  5. sqlserver jdbc 包下载
  6. 音视频学习(十一、PCM格式介绍)
  7. 1个字节(0-255)十进制二进制八进制十六进制转换对照表
  8. 【SSL】最佳浏览路线
  9. arcgis不闭合线转面_如何将ArcGIS不闭合线转化为面
  10. ProxyCap v4.12