How do you select the fastest mirror from the command line?

1

Answer #: 1

Pakket netselect-apt dapper (net): Choose the fastest Debian mirror with netselect [universe] 0.3.ds1-5: all hardy (net): Choose the fastest Debian mirror with netselect [universe] 0.3.ds1-11: all Pakket apt-spy dapper (admin): writes a sources.list file based on bandwidth tests [universe] 3.1-14: amd64 i386 powerpc

Not included in newer Ubuntu due to secturity issues it seems: see: Bug report

But .. I normally just use ping to find out the speed of a connection to some location. Amount of hops and latency.

Answer #: 2

You don’t have to do any searching anymore – as ajmitch has explained, you can use deb mirror to have the best mirror picked for you automatically.

apt-get now supports a ‘mirror’ method that will automatically select a good mirror based on your location. Putting:

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt...
0 0
2
...
0 0
3

If you want to update and upgrade your sources.list file with the fastest servers from the command line in a fresh Ubuntu Server install, it’s quite easy with the GUI, but it doesn’t seem to be a simple way to do it from from the command line. You can us deb mirror to have the best mirror picked for you automatically.

apt-get now supports a ‘mirror’ method that will automatically select a fastest mirror based on your location.

Edit sources.list file

Put these codes on the top of the file, it will automatically pick a fastest mirror for you based on your geographical location.
Replace precise with the appropriate name Lucid (10.04), Maverick (10.10), Natty (11.04), Oneiric (11.10), Precise (12.04), Quantal (12.10), and Raring (13.04).

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb...

0 0
4

From all the different VPS providers I have tried I’ve most often only used the default mirrors that are installed when the VPS is provisioned which sometimes is not the closest one.

You can and update this to the geographically closest by running netselect-apt.

Netselect-apt downloads the official Debian mirror lists and tests the access speeds to find out which one is closest to you. It will then create a brand new sources.list with the result for your /etc/apt/ directory.

Installation is easy:

start it by running:

wait while the different mirrors are tested. When it’s finished, you will end up with a sources.list in the directory where you executed the command in.

Move it to your /etc/apt/directory by executing:

and then run

Now, you would have the closest Debian mirror setup which would give the best download...

0 0
5

The following guide will provide you with some information on how to improve Ubuntu's repository download speed by selecting the closest, that is, possibly fastest mirror relative to your geographical location.

1. Country Code

The simplest approach is to make sure that your Ubuntu mirror defined within

/etc/apt/sources.list

includes a relevant country code appropriate to your location. For example, below you can find a official United States Ubuntu mirror as found in

/etc/apt/sources.list

:

deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

If you are not located in United States simply overwrite the

us

country code with appropriate code of your country. That is, if your are located for example in Australia update your

/etc/apt/sources.list

file for all entries as:

deb http://au.archive.ubuntu.com/ubuntu/ xenial main restricted

2. Use mirror protocol

Using mirror protocol as part of your

...
0 0
6

Let me let you in on a little secret: if you learn and understand Powershell you will be indispensable to your employer. Employers are looking for technically adept new hires who know how to script, pipe and flip text without a sweat. And the suits in Redmond are actively making Powershell the de-facto way of doing things in Windows.

Windows Server 2012 R2 defaults to the command line and Windows Server 2016 continues to put the emphases on using this awesome command line utility.

I could rhapsodize about Powershell for hours but today I just want to focus on easily listing all processes from the command line. Let me show you how awesome this is:

It is my conviction that you can do anything faster at the command line than in a GUI. Once you get comfortable with commands you’ll be freaking unstoppable.

Hit the Windows Logo key, type “power”, press and hold Ctrl + Shift while clicking Powershell and you’ll run as Administrator.

Now it’s time to...

0 0
7

When you are experiencing slow Internet access, you may want to test the Internet speed of your upstream ISP (often called "last mile" in the residential broadband networks) as part of troubleshooting. For that matter, Speedtest.net is probably the most widely used broadband speed testing website.

Underneath it, Speedtest.net loads JavaScript code in your web browser, which then automatically detects the closest Speedtest.net server from you, and measures download/upload speed by sending HTTP GET and POST requests to the server.

However, if you are trying to check Internet speed from a remote headless server, VPS or an otherwise desktop-less system, Speedtest.net's Flash-based user-friendly interface would be no good. For those of you, there is a command-line interface (CLI) version of Speedtest.net, known as speedtest-cli. Here I will demonstrate how to use speedtest-cli to check Internet speed from the command line in Linux.

Install speedtest-cli on...

0 0
8

You don't have to do any searching anymore - as ajmitch has explained, you can use deb mirror to have the best mirror picked for you automatically.

apt-get now supports a 'mirror' method that will automatically select a good mirror based on your location. Putting:

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse

on the top in your /etc/apt/sources.list file should be all that is needed to make it automatically pick a mirror for you based on your geographical location.

Lucid (10.04), Maverick (10.10), Natty (11.04), and Oneiric (11.10) users can replace precise with the appropriate...

0 0
9
Sponsored Link

If you want to select Ubuntu mirror which works fastest for you follow these steps this is very important to any ubuntu user to download and install ubuntu packages fastest way.

To launch Synaptic, choose System > Administration > Synaptic Package Manager

Now you need to select Settings -> Repositories.

Select Ubuntu Software tab In the Download From drop down, choose Other...

Click the Select Best Server button in the resulting dialog.Wait a minute (or perhaps more on a slow connection).

Testing best server is in progress

Once it's finished,click on choose server

close everything and click Reload in the main Synaptic window.

Downloading package information in progress from your new mirror

This simple procedure picks the best mirror for you. This works for me very well so i would suggest you try this and see if it works for you or not.

If you...

0 0
10

This command should do the trick

sudo sed -i 's/http:\/\/us./http:\/\//g' /etc/apt/sources.list

It will remove the 'us.' prefix in each of the addresses to convert them to addresses of the main server.

Of course replace 'us' by any other mirror you are using.

In depth explanation of command:

sed - stream editor for filtering and transforming text.

The -i argument is to edit a file in place.

Then 's/regexp/replacement/g', s specifying the search and replace command.

The g at the end being the argument to "globally" search.

The forward slash is the delimiter between the command and arguments except where it is escaped with a backslash.

Conclusion: replaces all occurrences of http://us. with http:// in the file /etc/apt/sources.list.

Note: if your replacement text has forward slashes, it may be clearer to use a pipe as the sed delimiter (ref...

0 0
11

The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu based systems.

To find out the package name and with it description before installing, use the ‘search‘ flag. Using “search” with apt-cache will display a list of matched packages with short description. Let’s say you would like to find out description of package ‘vsftpd‘, then command would be.

Syntax:

apt-cache search SearchTerm $ apt-cache search vsftpd

The possible output would be:

vsftpd - lightweight, efficient FTP server written for security ccze - A robust, modular log coloriser ftpd - File Transfer Protocol (FTP) server yasat - simple stupid audit tool

To find and list down all the packages starting with ‘vsftpd‘, you could use the following command.

$...
0 0
12

If the original question is what I have been looking for an answer to then I, and obviously no one above, has come up with a clear solution.

What I am looking for is to copy the test directory into the test2 directory without having to type it in again. Something like

xcopy /isvy c:\test d:\test2

where d:\test2\test does not exist before the copy but does after. This would save on miss-typing test the second time in the destination path. The above command will copy all the files and any directories into test2 but will not create the test directory.

So far

xcopy /isvy c:\test d:\test2\test

is really the only way I have found to get this job done. Again if you have typing issues there is no guarantee that the source and destination directories will match.

An alternative to correct this is

set mydir=test&&xcopy /isvy c:\%mydir% c:\test2\%mydir%

This sets the destination directory in the mydir variable then uses that variable in both the source...

0 0