zoukankan      html  css  js  c++  java
  • Ubuntu16.04换源(转)

    乌班图换源(ubuntu 16.04换阿里云源为例)

    换成国内最快的阿里云源

    第一步:备份原来的源文件

    cd /etc/apt/  
    
    • 1
    • 2

    然后会显示下面的源文件sources.list 
    输入命令 
    sudo cp sources.list sources.list.bak 
    就是将sources.list备份到sources.list.bak

    第二步:替换源

    阿里云源的文件

        deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
        deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
        deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
        deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
        ##测试版源  
        deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
        # 源码  
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
        ##测试版源  
        deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
        # Canonical 合作伙伴和附加  
        deb http://archive.canonical.com/ubuntu/ xenial partner  
        deb http://extras.ubuntu.com/ubuntu/ xenial main  

    替换并保存 
    sudo gedit sources.list打开文件,替换成阿里云文件即可

    第三步:更新源和软件

       sudo apt-get update 更新源  
       sudo apt-get upgrade 更新软件 
  • 相关阅读:
    06深入理解C指针之---指针操作和比较
    05深入理解C指针之---指针声明和解引
    04深入理解C指针之---指针优缺点
    03深入理解C指针之---变量与内存
    iOS UIWebView获取403/404
    控制动画时间
    控制动画时间
    iOS中消息的传递机制
    iOS中消息的传递机制
    HTML5能取代Android和iOS应用程序吗?
  • 原文地址:https://www.cnblogs.com/shixiuxian/p/9069310.html
Copyright © 2011-2022 走看看