ubuntu系统默认源更改为阿里源

Posted the_tops ----

tags:

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

from:http://blog.csdn.net/minicto/article/details/62240020

ubuntu系统默认源更改为阿里源

ubuntu默认使用的国外的源,在更新的时候会很慢,可以使用国内的阿里的源,速度很快。

依次执行如下命令,

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
sudo vim /etc/apt/sources.list #修改
sudo apt-get update #更新列表

阿里的源,如下,

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

接着执行,如下,

apt-get update

可以看到如下更新过程的详细内容,

Get:71 http://mirrors.aliyun.com trusty-backports/multiverse Translation-en [1,215 B]
Get:72 http://mirrors.aliyun.com trusty-backports/restricted Translation-en [28 B]
Get:73 http://mirrors.aliyun.com trusty-backports/universe Translation-en [36.8 kB]
Get:74 http://mirrors.aliyun.com trusty Release [58.5 kB]                      
Get:75 http://mirrors.aliyun.com trusty/main Sources [1,064 kB]                
Get:76 http://mirrors.aliyun.com trusty/restricted Sources [5,433 B]           
Get:77 http://mirrors.aliyun.com trusty/universe Sources [6,399 kB]            
Get:78 http://mirrors.aliyun.com trusty/multiverse Sources [174 kB]            
Get:79 http://mirrors.aliyun.com trusty/main amd64 Packages [1,350 kB]         
Get:80 http://mirrors.aliyun.com trusty/restricted amd64 Packages [13.0 kB]    
Get:81 http://mirrors.aliyun.com trusty/universe amd64 Packages [5,859 kB]     
Get:82 http://mirrors.aliyun.com trusty/multiverse amd64 Packages [132 kB]     
Get:83 http://mirrors.aliyun.com trusty/main i386 Packages [1,348 kB]          
Get:84 http://mirrors.aliyun.com trusty/restricted i386 Packages [13.4 kB]     
Get:85 http://mirrors.aliyun.com trusty/universe i386 Packages [5,866 kB]      
Get:86 http://mirrors.aliyun.com trusty/multiverse i386 Packages [134 kB]      
Get:87 http://mirrors.aliyun.com trusty/main Translation-en [762 kB]           
Get:88 http://mirrors.aliyun.com trusty/multiverse Translation-en [102 kB]     
Get:89 http://mirrors.aliyun.com trusty/restricted Translation-en [3,457 B]    
Get:90 http://mirrors.aliyun.com trusty/universe Translation-en [4,089 kB]     
Ign http://mirrors.aliyun.com trusty/main Translation-en_US                    
Ign http://mirrors.aliyun.com trusty/multiverse Translation-en_US              
Ign http://mirrors.aliyun.com trusty/restricted Translation-en_US              
Ign http://mirrors.aliyun.com trusty/universe Translation-en_US   

说明已经使用阿里源在进行更新了。

以上是关于ubuntu系统默认源更改为阿里源的主要内容,如果未能解决你的问题,请参考以下文章

Docker拉取的镜像源更改为国内的镜像源

Docker拉取的镜像源更改为国内的镜像源

将视频源更改为blob / ObjectURL

Docker拉取的镜像源更改为国内的镜像源

将pip的下载源更改为国内镜像

把系统默认的yum源改为阿里云(从阿里云里下载软件)