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
We need your assistance to stay live
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 |
- Fedora 21 Scheduled For Release In October : For Fedora users, just keep calm and use Fedora 20 for now. Fedora Developers has announced that F...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 Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 : Updated January 12, 2014 LAMP is a combination of operating system and open-source software stack. ...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 |
- How to Install uTorrent Client on Ubuntu/Debian/Linux Mint : uTorrent is a lightweight and efficient BitTorrent client for Linux, Windows OS and Mac OS. The inst...0 comments |
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .