一,安装方法1
add-apt-repository ppa:ossug-hychen/getfastmirror
apt-get isntall getfastmirror
如果添加了临时源,这样移除
add-apt-repository --remove ppa:ossug-hychen/getfastmirror
二,安装方法2
wget -O getfastmirror-master.zip https://github.com/alvan/getfastmirror/archive/debian/0.2.4-1.zip
unzip ./getfastmirror-master.zip
cd ./getfastmirror-master/
./setup.py install
注意:取最新release版本。
执行这个命令,将直接更以更快的镜像列表:
getfastmirror update -t
mirror: mirrors.sohu.com - time: 0.079617023468
mirror: mirrors.zju.edu.cn - time: 0.14871096611
mirror: mirrors.yun-idc.com - time: 0.154850959778
mirror: mirrors.aliyun.com - time: 0.161314964294
mirror: ubuntu.cn99.com - time: 0.162769079208
mirror: mirror.cogentco.com - time: 2.62425398827
and the winner is: mirrors.sohu.com
查看:
/etc/apt/sources.list
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse