linux,

Check Internet speed from the CLI on Linux

Oct 18, 2021 · 1 min read · Post a comment

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

  • Linux bash environment

Solution

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

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 want to 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 and on-point tutorial. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.