How To Find Fastest Mirror Lists With ‘Netselect-apt’ On Debian
This handy tutorial will help you to find and select the fastest mirror lists to get update or upgrade or install software’s on your debian systems. As we all know this is very easy to do in GUI mode. We can easily select the region based best nearest mirror list through Synaptic package Manager.
To do that open Synaptic package Manager. Go to Settings -> Repositories. Select “Other” in the “Download From” drop-down box and click on Select Best Mirror.
But what about from command line?
Well, for this Debian has a useful command line tool called “netselect-apt”. Just install the command and run it to find the fastest mirror for your region. It will fetch a fastest mirror lists and you can update your sources.list file with the new mirror list generated by ‘netselect-apt’ to get updates/upgrades effectively.
netselect-apt automatically creates a sources.list file for using with apt for the specified distribution by downloading the list of Debian mirrors using wget and choosing the fastest servers (both US and non- US) using netselect. The output file is written to OUTFILE. If there is a file called mirrors_full in the current directory which lists the Debian mirrors, netselect-apt uses that rather than downloading another copy.
netselect-apt [OPTIONS] [stable|testing|unstable|experimental|release_codename|sid]
Specify which distribution of Debian to use. By default stable is used.
-a, –arch ARCH
Use mirrors containing ARCH. By default the architecture of the current machine is used as reported by dpkg.
While generating OUTFILE include also deb-src lines to use with “apt-get source” to obtain Debian source packages.
-i, –infile INFILE
Use INFILE instead of downloading the mirror list to a temporary file. The file must be in the same format as mirrors_full.
-o, –outfile OUTFILE
Use OUTFILE instead of sources.list.
Include also non-free section while generating OUTFILE.
Use FTP mirrors instead of HTTP and generate OUTFILE accordingly.
The OPTIONS provided are added, verbatim, to netselect when it is run. Here you can provide a (quoted) list of options for net‐select.
-t, –tests hosts
Make a short list with the number of hosts provided and use that list to test for mirror validity. By default 10 hosts are tested.
-c, –country COUNTRY
Only test the sites found under the country COUNTRY (the value can either be an ISO-3166 value or the full name of the language, in English). When this value is set the mirror list or the INFILE will be filtered and only the sites that are listed under the given country will be tested. Note that restricting the search might not give the best results, as the “fastest”
mirror might not even be in the same country as the system the program is running in.
Install ‘netselect-apt’ On Debian
First switch to root user with command:
Then install netselect-apt package with command:
# apt-get install netselect-apt
Find Fastest Debian Mirror
Enter the following command to find fastest debian mirror list.
Append or move the sources.list file contents generated by netselect-apt command to /etc/apt/sources.list file as shown below.
# mv sources.list /etc/apt/sources.list
Now update or upgrade or install software’s in your debian system. You will notice that speed difference.
Find Mirrors Depending Upon Your Distribution Version
I am using Debian 7 ‘Wheezy’. To select mirrors depending upon your distribution version(code name), the command should be:
# netselect-apt wheezy
Suppose if you want to find only the fastest ftp mirrors instead of http, then the command should be:
# netselect-apt -f wheezy
If you want to include non-free repositories, enter the following command:
# netselect-apt -n wheezy
You can also include parameters for stable, non-stable and testing etc. If you didn’t include any parameters, then this command will list the fastest stable http mirror list.
Please note that the speed of this mirrors may vary often, so i suggest you to run this command atleast once in a week and update the sources.list.
For more information about ‘netselect-apt’ command, please refer the man pages.
# man netselect-apt
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7 : OpenLDAP is a free open source Light Weight Directory Access protocol developed by the OpenLDAP proj...0 comments |
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint : Tor, The Onion Router, is a network of Virtual Tunnels that allows users to communicate securely and...1 comment |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update : Canonical has released security updates for Ubuntu 12.04 LTS and advices to update your system as so...0 comments |
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
- Selene Media Encoder: Convert Audio, Video Files To Most Popular Formats
- Linux Kernel 3.12.2 Is Available For Download! Install / Upgrade Instructions
- CentOS 6.5 Has Been Officially Released!
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .