4.ubuntu换源

Posted 如果我年少有为

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了4.ubuntu换源相关的知识,希望对你有一定的参考价值。

ubuntu换源

目的:ubuntu默认的源是国外的,使用apt-get的时候很慢,换成国内的源可以在安装软件时快很多很多。我用的是ubuntu16.04。

 

相关文件: /etc/apt/sources.list

 

步骤:

(1).先备份这个文件(以防以后需要)

sudo cp  /etc/apt/sources.list  /etc/apt/sources.list.bak

(2).将文件中内容换成其他源(选一个源就行)

sudo nano /etc/apt/sources.list   ,把以前的内容删除,从下边的源中选一个复制粘贴。ctrl+O保存,回车 确认,ctrl+X退出,即可。(注:有的时候某个源换了也不好用,那就再换个别的试试)

(3).命令行运行 sudo apt-get update ,更新一下就行了。

 

 

阿里源

deb http://mirrors.aliyun.com/ubuntu/ xenial main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

 

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

 

deb http://mirrors.aliyun.com/ubuntu/ xenial universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

 

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main

deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

 

 

 

清华源

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 http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe

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

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe

 

其他源自行百度

以上是关于4.ubuntu换源的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu换源

Ubuntu换源

Ubuntu换源

ubuntu换源

Ubuntu 换源

Ubuntu换源