Check Internet Speed from Command Line

Check Internet Speed from Command Line

speedtest-clit.png
In this article we will come to know about how to check internet speed from command line on linux.
The tool we are going to use is speedtest-cli. Speedtest-cli is written in python.

Steps to install speedtest-cli:
you can Choose any method from above as per your comfort level.

Installation:

Using pip install:
$ pip install speedtest-cli

or

using easy_install:
$ easy_install speedtest-cli

Github
$ pip install git+https://github.com/sivel/speedtest-cli.git

or

Using python/git:
$ git clone https://github.com/sivel/speedtest-cli.git
$ python speedtest-cli/setup.py install

or

using wget:
Just download (Like the way it used to be)
$ wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli

or

using curl:
$ curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli

Now test speed using speedtes-cli from command line:

$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Tata Teleservices ISP (...........)...
Selecting best server based on latency...
Hosted by Atria Convergence Technologies [7.52 km]: 13.18 ms
Testing download speed........................................
Download: 7.54 Mbit/s
Testing upload speed..................................................
Upload: 7.90 Mbit/s

If you want to share the speed test result, you can use “–share” option, which will allow you to share speed test result with others in an image format via Speedtest.net.

$ speedtest-cli --share
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Tata Teleservices ISP (.....)...
Selecting best server based on latency...
Hosted by YOU Broadband India Pvt Ltd. (........) [7.52 km]: 11.568 ms
Testing download speed........................................
Download: 7.39 Mbit/s
Testing upload speed..................................................
Upload: 7.82 Mbit/s
Share results: http://www.speedtest.net/result/4978909515.png


Usage:

$ speedtest-cli --help
usage: speedtest-cli [-h] [--bytes] [--share] [--simple] [--list]
                     [--server SERVER] [--mini MINI] [--source SOURCE]
                     [--timeout TIMEOUT] [--secure] [--version]

Command line interface for testing internet bandwidth using speedtest.net.
--------------------------------------------------------------------------
https://github.com/sivel/speedtest-cli

optional arguments:
  -h, --help         show this help message and exit
  --bytes            Display values in bytes instead of bits. Does not affect
                     the image generated by --share
  --share            Generate and provide a URL to the speedtest.net share
                     results image
  --simple           Suppress verbose output, only show basic information
  --list             Display a list of speedtest.net servers sorted by
                     distance
  --server SERVER    Specify a server ID to test against
  --mini MINI        URL of the Speedtest Mini server
  --source SOURCE    Source IP address to bind to
  --timeout TIMEOUT  HTTP timeout in seconds. Default 10
  --secure           Use HTTPS instead of HTTP when communicating with
                     speedtest.net operated servers
  --version          Show the version number and exit
Plz Share Share on FacebookShare on Google+Share on LinkedInTweet about this on TwitterEmail this to someoneShare on RedditShare on TumblrDigg thisBuffer this pagePrint this pagePin on PinterestShare on StumbleUponFlattr the author
Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *