zoukankan      html  css  js  c++  java
  • Ubuntu16.04 替换阿里云软件源

    一,备份原来的源文件

    1,首先,进入源文件 sources.list 所在的目录:

    cd /etc/apt/

    2,执行sudo cp sources.list sources.list.bak对源文件进行备份,以防万一;

    二,修改源文件内容

    1,阿里云软件源的文件的内容如下:

    #deb包
    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  

    2,将上述的阿里云的源文件内容全部复制先

    使用sudo vim sources.list打开文件,输入ggdG删除所有内容(这句指令可以理解为从第1行到最后1行之间的内容都删了)

    将复制的内容粘贴到本文件中;输入:wq保存退出;

    三,更新源和软件

    1,使用sudo apt-get update即可更新获取 阿里云软件源 提供的软件列表;
    2,使用sudo apt-get upgrade即可更新软件;

  • 相关阅读:
    LeetCode OJ 112. Path Sum
    LeetCode OJ 226. Invert Binary Tree
    LeetCode OJ 100. Same Tree
    LeetCode OJ 104. Maximum Depth of Binary Tree
    LeetCode OJ 111. Minimum Depth of Binary Tree
    LeetCode OJ 110. Balanced Binary Tree
    apache-jmeter-3.1的简单压力测试使用方法(下载和安装)
    JMeter入门教程
    CentOS6(CentOS7)设置静态IP 并且 能够上网
    分享好文:分享我在阿里8年,是如何一步一步走向架构师的
  • 原文地址:https://www.cnblogs.com/Glf9832/p/8972497.html
Copyright © 2011-2022 走看看