Blog

How to check Internet speed from command line on Linux

  |   Uncategorized   |   No comment
Want create site? With Free visual composer you can do it easy.

Sometimes, you may want to test the Internet speed of your upstream ISP as part of troubleshooting. For that matter, we are usually using the website http://speedtest.net.

Underneath it, Speedtest.net loads a 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 and give it you as a result.

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.

Download and Install speedtest-cli on Linux

speedtest-cli is a simple CLI client for measuring bidirectional Internet bandwidth by using Speedtest.net infrastructure.  Installing the latest speedtest-cli is nothing more than just downloading the Python script.

$ wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod a+rx speedtest_cli.py
$ sudo mv speedtest_cli.py /usr/local/bin/speedtest-cli
$ sudo chown root:root /usr/local/bin/speedtest-cli

How to Test Internet Connection Speed with speedtest-cli

To know the internet speed just run the command speedtest-cli. You will get all the result on screen.

$ speedtest-cli

This will automatically discover the closest Speedtest.net server (in terms of geographic distance), and report download and upload speed measured from the server.

root@aiderpro:~# speedtest-cli
Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
Testing from BSNL (117.228.209.81)…
Selecting best server based on ping…
Hosted by Hathway Cable and Datacom Ltd (Mumbai) [119.64 km]: 19.021 ms
Testing download speed………………………………….
Download: 4.47 Mbit/s
Testing upload speed…………………………………………..
Upload: 2.72 Mbit/s

If you want to get a list of available Speedtest.net servers around the world, use “–list” option. It will display a sorted list of Speedtest.net servers.

root@aiderpro:~# speedtest-cli –list |more
Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
3141) Intech Online Pvt. Ltd. (Thane, India) [119.56 km] 798) Honesty Net Solutions (Mumbai, India) [119.64 km] 4310) Hathway Cable and Datacom Ltd (Mumbai, India) [119.64 km] 1718) Vodafone India (Mumbai, India) [119.64 km] 2938) Reliance Communications (Mumbai, India) [119.64 km] 3737) Indusind Media & Communication Ltd. (Mumbai, India) [119.64 km] 3315) Joister Infomedia Pvt. Ltd. (Mumbai, India) [119.64 km] 2679) Bharti Airtel Ltd (Hyderabad, India) [503.57 km] 3630) Excell Media Pvt Ltd (Hyderabad, India) [503.57 km] 3395) BEAM TELECOM (Hyderabad, India) [503.57 km] 3984) Pioneer Elabs Limited. (Hyderabad, India) [504.54 km] 3663) RAJESH PATEL NET SERVICES (P) LTD (Indore, India) [510.75 km]

Did you find apk for android? You can find new Free Android Games and apps.