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.


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 “” or “”.

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

Image credit: speed bugs

Damien Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.


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

    curl -o /dev/null

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

  3. 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 > /opt/speedlog.txt

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

      wget -O /dev/null 2>&1 | tee speedlog.txt

  4. 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.

  5. 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” or “” files for a larger sample.

  6. I would love if the results could be then be emailed 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?


    Easiest way to speed test using server via terminal

Comments are closed.