The speedtest-cli is a command line tool that enables to test internet bandwidth using speedtest.net service. It can be useful to monitor download speed, upload speed, and ping. The speedtest-cli requires the Python interpreter.
This tutorial explains how to install speedtest-cli on Raspberry Pi.
Connect to Raspberry Pi via SSH and download speedtest-cli script from GitHub repository to the
/usr/local/bin directory. Then add execute permission to the script.
sudo wget -O /usr/local/bin/speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py sudo chmod a+x /usr/local/bin/speedtest-cli
Now all users can use the speedtest-cli because it available as a system-wide command. Run this command to check version:
It's time to test internet bandwidth. This can be done by executing the following command:
Command outputs quite a bit of information. To get only basic information such as ping, download and upload speeds, use
If the speedtest-cli is not longer needed, you can remove it using this command:
sudo rm -rf /usr/local/bin/speedtest-cli