Test internet speed in ubuntu and raspberry pi 4 with CLI tool
You use Google to check whether the internet is working or not. Right now your life is changing you run a simple command to check internet speed on Ubuntu and Raspberry pi 4.

2 min read
Table of contents
Speedtest cli helps to tell the current internet speed in your terminal. Speed test cli is a terminal-based tool that helps test internet speed on your laptop, PC, etc. The speed test tool was designed and developed by Ookla. Speed test gives you all test results in your terminal. So You do not open the browser. Instead, go to the website and with for the internet speed result.
You use my article also work with Debian base all distros.
There are two ways to install speed test cli in raspberry pi four and ubuntu.
- Official command support
- With snap
Official command support
The official command provides by a speed test. In the first step, you run two commands. the first command is the curl command, and the second is an apt-get command.
Curl
Curl command help to step speed test installer and fetch all required file locally.
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
copy success

Apt-get
Apt-get help to set up your local speed test installer package in ubuntu and raspberry pi 4.
sudo apt-get install speedtest
copy success

How to uninstall or remove the speed test with the apt-get command?
sudo apt-get purge speedtest
copy success

With snap
You run the snap command with the speed test package. Then, snap cli automatic setup everything for you.
sudo snap install speed-test
copy success
How to uninstall or remove the speed test with snap?
sudo snap remove --purge speedtest
copy success
How to test whether the speed test is installed or not?
speedtest
copy success
References
https://www.speedtest.net/apps/cli
https://snapcraft.io/speed-test