How To Test Internet Speed Using Linux Command Line?
Short Bytes: If you want to check your internet speed using the Linux command Line, here are some utilities which can help you out. These tools use the nearest servers listed on speedtest.net to test the download and upload speed of your internet connection.
You recently upgraded your broadband connection. Now, what’s better than testing the connection speed and feeling proud about your decision. Ookla’s Speed Test is probably the most used internet speed testing service out there.If you want to drop the idea of testing your connection speed using a web browser, taking the help of your Linux command line can be a great idea. Here are some command line utilities which can help you test the speed of your internet using the command line.
Speedtest-cli
Developer: Matt Martz (sivel)
Speedtest-cli is a command line tool which uses the servers of Speedtest.net to measure the bandwidth of your internet connection. The Python-based tool requires Python 2.4-3.5 in order to work correctly on your Linux distro.
You can install speedtest-cli using the Python PIP package manager by typing the following commands:
Install PIP:
Install Speedtest-cli:
pip install speedtest-cli
To test internet speed, just type the following command and press enter:
speedtest-cli
You can find various options in the help section of the utility:
speedtest-cli -h
Display the internet speed in megabytes/sec:
speedtest-cli --bytes
Get a list of avaialble servers (sorted in asceding order according to the distance from your location):
speedtest-cli --list
Choose a specific server to test internet speed:
speedtest-cli --server server_id
Replace the server_id with the number written before a server in the list.
Recommended: How To Google Search In Command Line Using Googler
Tespeed
Developer: Janis Jansons
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.
It also requires lxml and argparse python modules on Debian (and derived distros), use the following commands:
sudo apt-get install python-lxml python-argparse
Now type the following command to copy the repo and install Tespeed on your machine:
git clone git://github.com/Janhouse/tespeed.git
cd tespeed
git submodule init
git submodule update
Recommended: How To Use StackOverflow Inside Your Terminal Window?
Test internet speed using Tespeed
You need to navigate to the directory tespeed using command line (you will have to do this everytime). Type the following command to intiate speed test:
python tespeed.py
This utility also has different optioal arguments to customise the speed test.
Display speed in megabytes/sec:
python tespeed.py -mib
Display server list:
]python tespeed.py -ls
In the place of [ListServer], type the number of servers you want the server list to display.
Display help:
python tespeed.py -h
So, these were two utilities you can use to test internet speed using the Linux command line. Alternatively, you can also download files using wget download manager on the command line. It will display the download speed. But it’s not an efficient method to test internet speed.
If you have something to add, tell us in the comments below.
Moreover, you can also check out our article on how to speed up internet on your PC with just few tips.