美文网首页
2018-02-28 ubuntu 16.04换国内源

2018-02-28 ubuntu 16.04换国内源

作者: liyanze | 来源:发表于2018-02-28 17:20 被阅读0次

    1.先备份原有的源

    sudo cp /etc/apt/source.list /etc/apt/source.list.bak 
     
    sudo vi /etc/apt/source.list  
    
    打开后,按“100dd”,再按“i”。
    

    2.复制换源

    搜狐源

    deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse  
      
    deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse  
      
    deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse  
      
    deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse  
      
    deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse  
      
    deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse  
      
    deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse  
      
    deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse  
      
    deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse  
      
    deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse  
    

    网易源

    deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse  
      
    deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse  
      
    deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse  
      
    deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse  
      
    deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse  
      
    deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse  
      
    deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse  
      
    deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse  
      
    deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse  
      
    deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
    

    阿里云源

    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted  
    
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe 
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted  
    
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
    
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties  
    
    deb http://archive.canonical.com/ubuntu xenial partner  
    
    deb-src http://archive.canonical.com/ubuntu xenial partner  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted 
     
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties  
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe 
     
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse  
    
    

    !!!复制粘贴后,记得保存。按“Esc”,再按“wq!”。

    3.执行命令进行源更新

    sudo apt-get update
    
    sudo apt-get upgrade
    
    sudo apt-get dist-upgrade
    

    相关文章

      网友评论

          本文标题:2018-02-28 ubuntu 16.04换国内源

          本文链接:https://www.haomeiwen.com/subject/crdixftx.html