访问 清华镜像站,选择对应 Ubuntu 版本

    1. 备份原来的 source

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

    1. 更换源

    sudo rm sources.list
    sudo nano sources.list
    在编辑器中写入清华站的源

    1. # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    2. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
    3. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
    4. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
    5. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
    6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
    7. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
    8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
    9. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
    10. # 预发布软件源,不建议启用
    11. # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
    12. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
    1. sudo apt update

    作者:T_K_233
    链接:https://www.jianshu.com/p/9e2266373fe0
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。