一,安裝方法1
add-apt-repository ppa:ossug-hychen/getfastmirror
apt-get install 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
apt-get install python-setuptools
cd getfastmirror-debian-0.2.4-1
./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