Before installing Speedtest CLI, update and upgrade your packages to the latest versions.
sudo apt update sudo apt upgrade -y
sudo yum update -y
If curl is not installed on your system, install it with the following commands:
sudo apt-get install curl
sudo yum install curl
Run the following command to add the Ookla repository:
curl -s https://install.speedtest.net/app/cli/install.deb.sh
curl -s https://install.speedtest.net/app/cli/install.rpm.sh
Once the repository is added, install the package:
sudo apt-get install speedtest-cli
sudo yum install -y speedtest
Check if Speedtest CLI is installed by running:
speedtest --version
Execute the following command to run a speed test:
speedtest
sudo apt update sudo apt upgrade -y curl -s https://install.speedtest.net/app/cli/install.deb.sh sudo apt install speedtest-cli speedtestCentOS
sudo yum update -y curl -s https://install.speedtest.net/app/cli/install.rpm.sh sudo yum install -y speedtest speedtest