• ubuntu 16.04 换源


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

    cd /etc/apt/

    命令 cp sources.list sources.list.bak 将sources.list备份到sources.list.bak

     第二步:替换源

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

    第三步:更新源

    sudo apt-get update 更新源

     2、配置pip 指定源:

    cd ~/.pip
    或者
    mkdir ~/.pip
    cd ~/.pip
    sudo vim ~/.pip/pip.conf
    写入以下内容:
    [global] 
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    [install]
    trusted-host = https://pypi.tuna.tsinghua.edu.cn  # trusted-host 此参数是为了避免麻烦,否则使用的时候可能会提示不受信任

    东北大学源:

    deb-src http://mirror.neu.edu.cn/ubuntu/ xenial main restricted #Added by software-properties

    deb http://mirror.neu.edu.cn/ubuntu/ xenial main restricted

    deb-src http://mirror.neu.edu.cn/ubuntu/ xenial restricted multiverse universe #Added by software-properties

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted

    deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties

    deb http://mirror.neu.edu.cn/ubuntu/ xenial universe

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates universe

    deb http://mirror.neu.edu.cn/ubuntu/ xenial multiverse

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates multiverse

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

    deb-src http://mirror.neu.edu.cn/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://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted

    deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-security universe

    deb http://mirror.neu.edu.cn/ubuntu/ xenial-security multiverse

     
    清华大学源:
    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe

    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

    阿里云源:

    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

    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 #Added by software-properties

    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

  • 相关阅读:
    【算法】剑指第二版面试题6 :从尾到头打印链表
    Go电商秒杀 (1)
    Go秒杀服务端优化
    Linux AUFS 文件系统
    mount挂载虚拟文件系统
    自己动手写docker之Linux命令(CentOS7.7)
    自己动手写docker之namespace和cgroup
    【协作式原创】自己动手写docker之urfave cli
    Go 1.14之前的死循环Case
    linux下定时执行任务的方法
  • 原文地址:https://www.cnblogs.com/llfctt/p/11804082.html
Copyright © 2020-2023  润新知