How to Test Internet Connection Speed From the Terminal

If you are connected to a broadband network and are wondering how fast your Internet connection really is, here is a way to test your Internet connection speed with a simple command.

In Linux, open a terminal and type the following:

What this command does is to download a 10M file to your computer. However, since you are pointing the destination folder to “/dev/null”, no actual file are being saved to your computer. The file are discarded on arrival.

In the terminal, you will be able to see the speed of the download, which is equivalent to your Internet connection speed.

internet-connection-speed-terminal

Note:
1. If your Internet speed is so fast that you can’t detect the download speed, you can opt to download a 100M or 500M file instead. To do that, simply change the URL to download “test100.zip” or “test500.zip”.

2. Windows users can install Wget for Windows here while Mac users can grab the Mac version here.

Image credit: speed bugs

13 comments

  1. goodie

  2. For the mac just use curl -o instead of wget -O

    curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip

    1. Yeah! That will work as well.

  3. If you’re going to install Wget for windows, you may as well install Cygwin.

    http://www.cygwin.com/

  4. I run Linux, but I’m not very terminal-savvy. I would like to put this in a script and have the output be appended to a text file to give a log where changes in speed could be seen. I think I want the character “>” but would this do what I want:
    wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip > /opt/speedlog.txt

    1. Your command won’t work. You can try this:

      wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip 2>&1 | tee speedlog.txt

  5. Does this site allow to put the file back to test upload?

    1. You can check out this site: http://testmy.net/

  6. Would this be a way to test performance over a site-to-site vpn connection (i.e. place a similar file on a web server at the other side?)

    1. Theoretically yes, but a VPN route the connection over several layers, so the result might not be accurate.

  7. He doesn’t want to test for his theoretical maximum bandwidth… he likely just wants to know the actual speed that he’s currently getting across his VPN, today. Yes Simon, this command would do the job to provide an indicator of current performance, though I suggest using the test100.zip” or “test500.zip” files for a larger sample.

  8. I would love if the results could be then be emailed out..is that possible? I’m in need of setting up a daily speed test email for my connection at work. Is it possible to have this on a script that is activated every 24 hours and then sends out an email with the results?

  9. http://vpstip.com/how-to-speed-test-vps-in-linux/

    Easiest way to speed test using speedtest.net server via terminal

Comments are closed.