HOW TO: Test Your Internet Speed from the Command Line

Quickly check the speed of your internet connection without having to deal with all the bloat of a webpage.

Ever wanted to perform a quick internet speed test, but avoid a bloated website like If the answer is ‘Yes’, here’s a quick way to measure your internet speed using the command line.

speedtest-cli is a python tool that allows you to test your internet speed, from the command line, using This tool allows you to perform a quick speed test, view all available servers sorted by distance, specify a server that you want to use in order to check your internet speeds, perform only a download or upload test or generate a share result image URL.

You can use speedtest-cli on both Linux, macOS and Windows.


1. Install 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.


1.1 Install on macOS:

  • use Homebrew. Install with brew install speedtest-cli


1.2 Install 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.


2.  Once speedtest-cli is installed, check out the options with speedtest-cli -h


3.  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.


FSM has no ads or affiliate links. Your support would simply pay for our servers, domain and maintanance. If there's any leftover change, we'll get some coffee and a slice of pizza.

Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
More content?