netselect-apt
command line tool is here to help you find the fastest mirror available.Here is the basic idea:

As you can see on the above image 87.0 kB/s is rather disappointing. Let's try to change that using
netselect-apt
faster mirror locator tool. Installation is simple: # apt-get install netselect-aptNext we are going to find a fastest mirror located in Australia
-c
, we will compare results from 15 sites -t
if available, the architecture must be amd64 -a
and the version we are looking for is testing: # netselect-apt -c australia -t 15 -a amd64 -n testing Using distribution testing. Retrieving the list of mirrors from www.debian.org... --2015-01-29 19:33:12-- http://www.debian.org/mirror/mirrors_full Resolving www.debian.org (www.debian.org)... 140.211.15.34, 128.31.0.62 Connecting to www.debian.org (www.debian.org)|140.211.15.34|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 353167 (345K) [text/html] Saving to: ‘/tmp/netselect-apt.vPhJid’ /tmp/netselect-apt.vPhJid 100%[===============>] 344.89K 445KB/s in 0.8s 2015-01-29 19:33:14 (445 KB/s) - ‘/tmp/netselect-apt.vPhJid’ saved [353167/353167] Choosing a main Debian mirror using netselect. (will filter only for mirrors in country australia) netselect: 8 (8 active) nameserver request(s)... Duplicate address 218.100.43.30 (http://mirror.waia.asn.au/debian/, http://ftp.au.debian.org/debian/); keeping only under first name. Running netselect to choose 15 out of 12 addresses. ............................................................................................................................. Only found 12 hosts out of 15 requested. The fastest 15 servers seem to be: http://debian.mirror.uber.com.au/debian/ http://debian.mirror.serversaustralia.com.au/debian/ http://mirror.optus.net/debian/ http://mirror.overthewire.com.au/debian/ http://mirror.crucial.com.au/debian/ http://mirror.eftel.com/debian/ http://mirror.as24220.net/pub/debian/ http://ftp.iinet.net.au/debian/debian/ http://mirror.waia.asn.au/debian/ http://ftp.monash.edu.au/pub/linux/debian/ http://mirror.cse.unsw.edu.au/debian/ http://mirror.linux.org.au/debian/ Of the hosts tested we choose the fastest valid for HTTP: http://debian.mirror.uber.com.au/debian/ Writing sources.list. Done.
Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
netselect-apt
found only 12 mirrors from which the best choice is http://debian.mirror.uber.com.au/debian/
. netselect-apt
also created a sources.list
file in the current working directory for your consideration. If netselect-apt
command is run from the actual /etc/apt/
directory it will output your sources list file with a random suffix such as sources.list exists, moving to sources.list.1422520852
. Alternatively you can run
netselect-apt
command with fewer options: # netselect-apt testingor simply as:
# netselect-aptin which case the default Debian version will be
stable
. Once you have your sources.list
generated you can include the resulting mirror in your system's sources.list
by: # cp /etc/apt/sources.list /etc/apt/sources.list_backup # mv sources.list /etc/apt/sources.listOr only add the resulting line to your current
/etc/apt/sources.list
. Let's see the result