If you want to check your Internet speed through your terminal this article will guide you an easy way. Most of the time we have to check our download and upload speed of our Linux server through ssh this can be an easy and fast way to test speed. But it’s not just restricted to Linux only! You can install python in MacOS or Windows and can run these both scripts to test internet speed from terminal and DoS.


We have to install Speedtest-cli package first to use this tool. We’re going to need python.

Installing python

Type the following yum command to install Python on a CentOS/RHEL/Scientific Linux:

Type the following dnf command to install Python on a Fedora Linux v22+:

Download speedtest_cli.py

Type the following wget command to grab the speedtest_cli.py client:

Check the Internet speed

After we’re done installing python and successfully downloaded speedtest-cli python package we can run it.

Simply run this following command:

To see speed values in bytes instead of bits pass the --bytes option:

To generate and provide a URL to the speedtest.net share results image pass the --share option:

Of course, you can combine both the options:

Specify a server ID to test against!

First, grab a server list, enter:

To view a server ID, enter:

To search a server ID, enter:

OR just display a server ID:

Sample outputs:


Next use the server ID 2137:

Another command line utility for testing internet speed is Tespeed. This utlity tests your download and upload speed using five serves closest to your locations. It is also created using Python and requires Python 2.7 or higher versions to run.

What the script does:

  • Loads config from speedtest.net (http://speedtest.net/speedtest-config.php).
  • Gets server list (http://speedtest.net/speedtest-servers.php).
  • Picks 5 closests servers using the coordinates provides by speedtest.net config and serverlist.
  • Checks latency for those servers and picks one with the lowest.
  • Does download speed test and returns results.
  • Does upload speed test and returns results.
  • Optionally can return CSV formated results.
  • Can measure through SOCKS proxy.

TeSpeed: https://github.com/Janhouse/tespeed

Alternative speed test with speedcheck.org