对于中国的源,由于天朝不能访问国外的源,所以只可以修改源,蛋疼,通过配置了源,我们才可以通过apt-get install xx安装软件

目录

Ubuntu中文版默认选择的是cn.archive.ubuntu.com作为更新源(如果喜欢英文界面的用户那么更新源默认是Ubuntu官网的),在更新系统或者apt-get安装一些软件的时候速度会非常慢,大陆用户最好是添加其他合适的源到源列表的前面。我觉得速度比较不错的源是搜狐、网 易和台湾的源,教育网的推荐使用北理工的,貌似这个学校是教育网的骨干节点。

中国好用的源

本人觉得在北方,搜狐的源最好用,其次是163的,其他的就不好说了。


搜狐源

##搜狐源(山东网通:适合网通用户)
deb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

网易源

##网易源(广东电信:适合电信用户)
deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

北理工的源

deb http://mirror.bit.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirror.bit.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://mirror.bit.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirror.bit.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirror.bit.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirror.bit.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

台湾ubuntu官网源

deb http://tw.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse

修改源的方法

修改源的方法主要有三步骤
1、打开文件/etc/apt/sources.list
2、使用VIM编辑并保存
3、更新源sudo apt-get update

打开文件

sudo gedit  /etc/apt/sources.list

VIM编辑

##搜狐源(山东网通:适合网通用户)
deb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

更新源

我们需要修改更改过/etc/apt/sources.list之后一定要执行apt-get update进行更新,其他Linux发行版本一般都可以在上述镜像找到各自的
更新源。

sudo apt-get update

停止支持的老版本ubuntu源列表-old-releases

目前Ubutun版本更新迭代太快~常规版本的维护期都比较短,基本一年以内,只有像10.04, 12.04,14.04还有以后的16.04才会长久支持3-5年。

ubuntu的普通版本支持的时间都有限,过了支持的时间,更新源都会被停用,比如ubuntu9.10原来的源都失效了(包括官方源,类似ustc的第 三方源,因为这些第三方源也是和官方源同步的)。因此,直接用原来的源列表是不能安装更新软件的。为了解决这个问题,ubuntu官方专门出了一个 old-release的镜像(http://old-releases.ubuntu.com/),可以用这个源更新。

#ubuntu 9.10的源列
deb http://old-releases.ubuntu.com/ubuntu raring main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-backports main restricted universe multiverse

其他版本的只需要讲raring(ubuntu13.04版本)改成其版本代号即可。这样过期后的版本也可以继续使用了。

查看版本代号

我们需要将raring改为自己系统的代号,才可以用,我们可以通过运行sudo lsb_release -a 命令,来查看我们里面版本的数据,里面的codename就是版本的名称

codename就是版本的代号

Logo

更多推荐