Ubuntu16.04换成清华大学源

链接:https://blog.csdn.net/dty306034831/article/details/79188808

第一:备份源文件

cd /etc/apt/

然后会显示下面的源文件sources.list
输入命令
sudo cp sources.list sources.list.bak

就是将sources.list备份到sources.list.bak
第二步:替换源文件
清华大学源

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

sudo gedit sources.list打开文件,将里面的代码替换成上面的代码即可

第三步:更新源

       sudo apt-get update 更新源  
       sudo apt-get upgrade 更新软件
---------------------  
作者:电力电子小栈  
来源:CSDN  
原文:https://blog.csdn.net/dty306034831/article/details/79188808  
版权声明:本文为博主原创文章,转载请附上博文链接!

展开阅读全文

没有更多推荐了,返回首页