Ubuntu使用中科大软件源

Ubuntu默认的软件源实在太慢,更新要好久,于是参考网上的方法总结如下:
1.备份sources.list

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

2.选择http服务或ftp服务添加源到/etc/apt/sources.list中即可。
打开sources.list,替换里面的全部内容

sudo gedit /ect/apt/sources.list

下面以兰州大学镜像为例:
虽然版本不同源的地址会不同,只要根据自己使用的版本号替换下面内容的UBUNTU_VERSION即可。

deb ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-backports main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-proposed main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-security main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-updates main multiverse restricted universe
deb-src ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION main multiverse restricted universe
deb-src ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-backports main multiverse restricted universe
deb-src ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-proposed main multiverse restricted universe
deb-src ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-security main multiverse restricted universe
deb-src ftp://mirror.lzu.edu.cn/ubuntu UBUNTU_VERSION-updates main multiverse restricted universe

其中,UBUNTU_VERSION指的是开发代号的简称,比如8.10是intrepid,而12.04是precise。
我用的是12.04,因为是教育网,中科大的镜像我这里很快,所以选用了中科大的镜像。下面是具体配置:

deb http://mirrors.ustc.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu precise multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

3.刷新列表:

sudo apt-get update

显示如下信息:

忽略 http://mirrors.ustc.edu.cn precise InRelease
忽略 http://mirrors.ustc.edu.cn precise-backports InRelease
忽略 http://mirrors.ustc.edu.cn precise-proposed InRelease
忽略 http://mirrors.ustc.edu.cn precise-security InRelease
忽略 http://mirrors.ustc.edu.cn precise-updates InRelease 
获取:1 http://mirrors.ustc.edu.cn precise Release.gpg [198 B]
获取:2 http://mirrors.ustc.edu.cn precise-backports Release.gpg [198 B]
获取:3 http://mirrors.ustc.edu.cn precise-proposed Release.gpg [198 B]
获取:4 http://mirrors.ustc.edu.cn precise-security Release.gpg [198 B]
获取:5 http://mirrors.ustc.edu.cn precise-updates Release.gpg [198 B]
获取:6 http://mirrors.ustc.edu.cn precise Release [49.6 kB]          
获取:7 http://mirrors.ustc.edu.cn precise-backports Release [49.6 kB]
获取:8 http://mirrors.ustc.edu.cn precise-proposed Release [49.6 kB]          
获取:9 http://mirrors.ustc.edu.cn precise-security Release [49.6 kB]          
获取:10 http://mirrors.ustc.edu.cn precise-updates Release [49.6 kB]          
获取:11 http://mirrors.ustc.edu.cn precise/main Sources [934 kB]              
获取:12 http://mirrors.ustc.edu.cn precise/multiverse Sources [155 kB]        
获取:13 http://mirrors.ustc.edu.cn precise/restricted Sources [5,470 B]       
获取:14 http://mirrors.ustc.edu.cn precise/universe Sources [5,019 kB]        
获取:15 http://mirrors.ustc.edu.cn precise/main i386 Packages [1,274 kB]      
获取:16 http://mirrors.ustc.edu.cn precise/multiverse i386 Packages [121 kB]  
获取:17 http://mirrors.ustc.edu.cn precise/restricted i386 Packages [8,431 B] 
获取:18 http://mirrors.ustc.edu.cn precise/universe i386 Packages [4,796 kB]
忽略 http://archive.ubuntu.com precise InRelease                               
获取:19 http://archive.ubuntu.com precise Release.gpg [198 B]                 
获取:20 http://mirrors.ustc.edu.cn precise/main TranslationIndex [3,706 B]    
获取:21 http://mirrors.ustc.edu.cn precise/multiverse TranslationIndex [2,676 B]
获取:22 http://mirrors.ustc.edu.cn precise/restricted TranslationIndex [2,596 B]
获取:23 http://mirrors.ustc.edu.cn precise/universe TranslationIndex [2,922 B]
获取:24 http://mirrors.ustc.edu.cn precise-backports/main Sources [700 B]     
获取:25 http://mirrors.ustc.edu.cn precise-backports/multiverse Sources [14 B]
获取:26 http://mirrors.ustc.edu.cn precise-backports/restricted Sources [14 B]
获取:27 http://mirrors.ustc.edu.cn precise-backports/universe Sources [14 B]
获取:28 http://mirrors.ustc.edu.cn precise-backports/main i386 Packages [559 B]
获取:29 http://mirrors.ustc.edu.cn precise-backports/multiverse i386 Packages [14 B]
获取:30 http://mirrors.ustc.edu.cn precise-backports/restricted i386 Packages [14 B]
获取:31 http://mirrors.ustc.edu.cn precise-backports/universe i386 Packages [14 B]
获取:32 http://mirrors.ustc.edu.cn precise-backports/main TranslationIndex [71 B]
获取:33 http://mirrors.ustc.edu.cn precise-backports/multiverse TranslationIndex [70 B]
获取:34 http://mirrors.ustc.edu.cn precise-backports/restricted TranslationIndex [70 B]
获取:35 http://mirrors.ustc.edu.cn precise-backports/universe TranslationIndex [70 B]
获取:36 http://mirrors.ustc.edu.cn precise-proposed/main Sources [23.6 kB]    
获取:37 http://mirrors.ustc.edu.cn precise-proposed/multiverse Sources [14 B]
获取:38 http://mirrors.ustc.edu.cn precise-proposed/restricted Sources [14 B]
获取:39 http://mirrors.ustc.edu.cn precise-proposed/universe Sources [8,483 B]
获取:40 http://mirrors.ustc.edu.cn precise-proposed/main i386 Packages [58.5 kB]
获取:41 http://mirrors.ustc.edu.cn precise-proposed/multiverse i386 Packages [14 B]
获取:42 http://mirrors.ustc.edu.cn precise-proposed/restricted i386 Packages [14 B]
获取:43 http://mirrors.ustc.edu.cn precise-proposed/universe i386 Packages [18.4 kB]
获取:44 http://mirrors.ustc.edu.cn precise-proposed/main TranslationIndex [73 B]
获取:45 http://mirrors.ustc.edu.cn precise-proposed/multiverse TranslationIndex [70 B]
获取:46 http://mirrors.ustc.edu.cn precise-proposed/restricted TranslationIndex [70 B]
获取:47 http://mirrors.ustc.edu.cn precise-proposed/universe TranslationIndex [73 B]
获取:48 http://mirrors.ustc.edu.cn precise-security/main Sources [3,873 B]    
获取:49 http://mirrors.ustc.edu.cn precise-security/multiverse Sources [14 B]
获取:50 http://mirrors.ustc.edu.cn precise-security/restricted Sources [14 B]
获取:51 http://mirrors.ustc.edu.cn precise-security/universe Sources [2,143 B]
获取:52 http://mirrors.ustc.edu.cn precise-security/main i386 Packages [17.9 kB]
获取:53 http://mirrors.ustc.edu.cn precise-security/multiverse i386 Packages [14 B]
获取:54 http://mirrors.ustc.edu.cn precise-security/restricted i386 Packages [14 B]
获取:55 http://archive.ubuntu.com precise Release [49.6 kB]              
获取:56 http://mirrors.ustc.edu.cn precise-security/universe i386 Packages [3,190 B]
获取:57 http://mirrors.ustc.edu.cn precise-security/main TranslationIndex [72 B]
获取:58 http://mirrors.ustc.edu.cn precise-security/multiverse TranslationIndex [70 B]
获取:59 http://mirrors.ustc.edu.cn precise-security/restricted TranslationIndex [70 B]
获取:60 http://mirrors.ustc.edu.cn precise-security/universe TranslationIndex [72 B]
获取:61 http://mirrors.ustc.edu.cn precise-updates/main Sources [12.3 kB]     
获取:62 http://mirrors.ustc.edu.cn precise-updates/multiverse Sources [14 B]  
获取:63 http://mirrors.ustc.edu.cn precise-updates/restricted Sources [765 B] 
获取:64 http://mirrors.ustc.edu.cn precise-updates/universe Sources [4,206 B] 
获取:65 http://mirrors.ustc.edu.cn precise-updates/main i386 Packages [37.5 kB]
获取:66 http://mirrors.ustc.edu.cn precise-updates/multiverse i386 Packages [14 B]
获取:67 http://mirrors.ustc.edu.cn precise-updates/restricted i386 Packages [770 B]
获取:68 http://mirrors.ustc.edu.cn precise-updates/universe i386 Packages [11.5 kB]
获取:69 http://mirrors.ustc.edu.cn precise-updates/main TranslationIndex [73 B]
获取:70 http://mirrors.ustc.edu.cn precise-updates/multiverse TranslationIndex [70 B]
获取:71 http://mirrors.ustc.edu.cn precise-updates/restricted TranslationIndex [71 B]
获取:72 http://mirrors.ustc.edu.cn precise-updates/universe TranslationIndex [72 B]
获取:73 http://mirrors.ustc.edu.cn precise/main Translation-zh_CN [100 kB]    
获取:74 http://mirrors.ustc.edu.cn precise/main Translation-en [726 kB]       
获取:75 http://mirrors.ustc.edu.cn precise/multiverse Translation-zh_CN [6,476 B]
获取:76 http://mirrors.ustc.edu.cn precise/multiverse Translation-en [93.4 kB]
获取:77 http://mirrors.ustc.edu.cn precise/restricted Translation-zh_CN [2,620 B]
获取:78 http://mirrors.ustc.edu.cn precise/restricted Translation-en [2,395 B]
获取:79 http://mirrors.ustc.edu.cn precise/universe Translation-zh_CN [139 kB]
获取:80 http://mirrors.ustc.edu.cn precise/universe Translation-en [3,341 kB]
获取:81 http://mirrors.ustc.edu.cn precise-backports/main Translation-en [308 B]
获取:82 http://mirrors.ustc.edu.cn precise-backports/multiverse Translation-en [14 B]
获取:83 http://mirrors.ustc.edu.cn precise-backports/restricted Translation-en [14 B]
获取:84 http://mirrors.ustc.edu.cn precise-backports/universe Translation-en [14 B]
获取:85 http://mirrors.ustc.edu.cn precise-proposed/main Translation-en [25.7 kB]
获取:86 http://mirrors.ustc.edu.cn precise-proposed/multiverse Translation-en [14 B]
获取:87 http://mirrors.ustc.edu.cn precise-proposed/restricted Translation-en [14 B]
获取:88 http://mirrors.ustc.edu.cn precise-proposed/universe Translation-en [11.1 kB]
获取:89 http://mirrors.ustc.edu.cn precise-security/main Translation-en [7,050 B]
获取:90 http://mirrors.ustc.edu.cn precise-security/multiverse Translation-en [14 B]
获取:91 http://mirrors.ustc.edu.cn precise-security/restricted Translation-en [14 B]
获取:92 http://mirrors.ustc.edu.cn precise-security/universe Translation-en [1,931 B]
获取:93 http://mirrors.ustc.edu.cn precise-updates/main Translation-en [18.2 kB]
获取:94 http://mirrors.ustc.edu.cn precise-updates/multiverse Translation-en [14 B]
获取:95 http://mirrors.ustc.edu.cn precise-updates/restricted Translation-en [267 B]
获取:96 http://mirrors.ustc.edu.cn precise-updates/universe Translation-en [6,685 B]
获取:97 http://archive.ubuntu.com precise/multiverse i386 Packages [121 kB]   
命中 http://archive.ubuntu.com precise/multiverse TranslationIndex
获取:98 http://archive.ubuntu.com precise/multiverse Translation-zh_CN [6,476 B]
命中 http://archive.ubuntu.com precise/multiverse Translation-en       
下载 17.4 MB,耗时 7秒 (2,386 kB/s)                                            
正在读取软件包列表... 完成

显示速度为2M每秒,还是比较快的。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注