首页 > 代码库 > Ubuntu修改源

Ubuntu修改源

linux里的源,简单理解就是你用 apt-get 命令去下载安装软件时,系统去哪里找这个软件。去的那个位置就是源。

linux默认的源是国外的,下载速度比较慢,可以修改为国内的一些好的源地址,例如网易的、阿里的。

 

源是以一个文件的形式保存的,在/etc/apt/sources.list

修改源就是修改这个文本文件,把下面的国内源替换这个文件里的内容就好了。

网易源:

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

 

阿里云源(从阿里云的ECS主机上copy下来的,应该挺靠谱的):

deb http://mirrors.aliyun.com/ubuntu precise main restricted
deb http://mirrors.aliyuncs.com/ubuntu precise main restricted
deb-src http://mirrors.aliyun.com/ubuntu precise main restricted
deb-src http://mirrors.aliyuncs.com/ubuntu precise main restricted
deb http://mirrors.aliyun.com/ubuntu precise-updates main restricted
deb http://mirrors.aliyuncs.com/ubuntu precise-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu precise-updates main restricted
deb-src http://mirrors.aliyuncs.com/ubuntu precise-updates main restricted
deb http://mirrors.aliyun.com/ubuntu precise universe
deb http://mirrors.aliyuncs.com/ubuntu precise universe
deb-src http://mirrors.aliyun.com/ubuntu precise universe
deb-src http://mirrors.aliyuncs.com/ubuntu precise universe
deb http://mirrors.aliyun.com/ubuntu precise-updates universe
deb http://mirrors.aliyuncs.com/ubuntu precise-updates universe
deb-src http://mirrors.aliyun.com/ubuntu precise-updates universe
deb-src http://mirrors.aliyuncs.com/ubuntu precise-updates universe
deb http://mirrors.aliyun.com/ubuntu precise multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise multiverse
deb-src http://mirrors.aliyun.com/ubuntu precise multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise multiverse
deb http://mirrors.aliyun.com/ubuntu precise-updates multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-updates multiverse
deb-src http://mirrors.aliyun.com/ubuntu precise-updates multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-updates multiverse
deb http://mirrors.aliyun.com/ubuntu precise-backports main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

Ubuntu修改源