Ubuntu apt replaces Tsinghua mirror source

  1. First enter the apt configuration directory and back up the original mirror list
    cd /etc/apt/
    sudo cp sources.list sources.list.bak
    
  2. Modify source.list
    sudo gedit sources.list
    
    Amended to the following
    # 默认注释了源码镜像以提高 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. Update apt
    apt-get update
    
    Insert picture description here

Download a vim to try the speed

Insert picture description here

Yes, it's over!

Refer to https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ for
different versions of Linux, you can also check this out!

Guess you like

Origin blog.csdn.net/qq_39906884/article/details/89707016