Assuming CURL is already installed on your system.
- Navigate to your home folder
- Download the script and run it
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
- Install the software
sudo apt-get install speedtest
- Try it out!
You may have to answer
YES to the questions it asks you and all that.