We all know this situation: you are on a fresh setup of Linux remote server or a headleas Raspberry Pi, and somehow the speed is not feeling right. Besides a iperf LAN speedtest for your device you can quickly check your connection speed to the outside with this handy python script command:

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

If you don’t have python installed run:

sudo apt-get update
sudo apt-get install python3

And if you want to save and run the script locally, rather than from a unknown github source, install the script via the following using pip:

pip install speedtest-cli

More information about the script or its advanced CLI commands can be found on github.