linux,

Check Internet Speed from CLI on Linux

Oct 18, 2021 · 1 min read · Post a comment
Check Internet Speed from CLI on Linux

In this day and age, experiencing a slow internet connection could be a huge deal, especially for most of us who work remotely. Since we can do almost anything from the CLI, let’s save us some time and check out how can we test internet connection speed from the terminal.

Prerequisites

  • Access to Linux bash environment

Solution

$ curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -

Example output:

Retrieving speedtest.net configuration...
Testing from *** (x.x.x.x)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by *** (***) [42.12 km]: 22.927 ms
Testing download speed................................................................................
Download: 48.44 Mbit/s
Testing upload speed................................................................................................
Upload: 4.00 Mbit/s

Notes:

  • speedtest-cli is a free and open source command-line tool. Official GitHub repository.
  • If you wanna install the speedtest-cli tool, either use pip,
    $ pip install speedtest-cli, or head over to their official CLI documentation.

Conclusion

Hope this was quick, on-point and a useful tutorial.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.