Ever wanted to check internet speed from the command line? Or check the internet speed test by avoiding a bloated website such as speedtest.net? If your answer is “Yes”, then you are on the correct place where we will guide you a quick way to use the command line to measure your Internet speed.

Speedtest-cli is a python tool for testing your Internet speed using speedtest.net from the command line. This tool enables you to perform a fast speed test, show all available servers sorted by distance, select a server you want to use to check your internet speeds, perform a download or upload test only, or create a speedtest.net share image result URL.

Check Internet speed from the command line 1

You can use speedtest-cli to check internet speed on both Linux, macOS and Windows.

1. Install and check internet speed on Linux:

  • Arch/Manjaro sudo pacman -S speedtest-cli
  • Debiant/Ubuntu/Pop!_OS/Linux Mint/etc sudo apt install speedtest-cli
  • Fedora sudo dnf install speedtest-cli
  • openSUSE sudo zypper install speedtest-cli
  • Other distros: if speedtest-cli is not in the repositories, you can install it using PIP. More info here 14.

2. Install and check internet speed on macOS:

  • use Homebrew. Install with brew install speedtest-cli

3. Install and check internet speed on Windows

  • Slightly more complicated but not impossible. Make sure you have python and pip installed and added to your system path. After that, it’s just a matter of installing speedtest-cli using pip. See the installation instruction linked in step 1
  • Once speedtest-cli is installed, check out the options with speedtest-cli -h
  • To check your internet speed simply type speedtest or speedtest --simple for speedtest-cli to output only the ping, download and upload speeds. For other options, see step 2.