Ubuntu apt更换清华镜像源

  1. 首先进入apt配置目录, 将原镜像列表备份
    cd /etc/apt/
    sudo cp sources.list sources.list.bak
    
  2. 修改source.list
    sudo gedit 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
    
  3. 更新apt
    apt-get update
    
    Ubuntu apt更换清华镜像源_第1张图片

下载一个vim试试速度

可以可以, 完事了!

参照 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
不同版本的Linux也可以看看这个哦!

你可能感兴趣的:(Linux,更换国内镜像,Ubuntu,Linux,apt)