ubuntu的apt-get换清华源

ubuntu的apt-get换清华源

原文地址:https://blog.csdn.net/qq_31456593/article/details/89638163

doit@doit-System-Product-Name:~$ cd /etc/apt/
# 备份源
doit@doit-System-Product-Name:/etc/apt$ sudo cp sources.list sources.list.bk
# 把原换为清华源
doit@doit-System-Product-Name:/etc/apt$ sudo gedit sources.list

修改sources.list的内容为下面的设置

# 默认注释了源码镜像以提高 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

更新apt-get

doit@doit-System-Product-Name:/etc/apt$ sudo apt-get update

在这里插入图片描述

©️2020 CSDN 皮肤主题: 撸撸猫 设计师:设计师小姐姐 返回首页