Speedtest on Ubuntu Server (commandline)
If you’re managing a headless Ubuntu server and want to check the network speed, you can’t just open speedtest.net in a browser. The speedtest-cli tool lets you run the same test from the command line.
Using the speedtest-cli is easy and very useful. You run it as follows:
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
./speedtest-cli
This downloads the script, makes it executable, and runs the test. It’ll pick the closest server automatically and show you download/upload speeds plus latency.
These days you can also install it via pip (pip install speedtest-cli) or through your package manager (apt install speedtest-cli), which is a bit cleaner than downloading the script directly. Either way, it’s a quick sanity check when you suspect network issues on a remote server.