# Ubuntu/Debian
sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest
# Fedora/Centos/Redhat
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bash
sudo yum install speedtest
# FreeBSD 13
sudo pkg add "https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-freebsd13-x86_64.pkg"
# Then run the command:
speedtest
brew tap teamookla/speedtestbrew update
# Example how to remove conflicting or old versions using brew
# brew uninstall
speedtest --forcebrew install speedtest --force