This is how!
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
./speedtest-cli
This are what results might look like
[root@stream4 ~]# ./speedtest-cli Retrieving speedtest.net configuration... Retrieving speedtest.net server list... Testing from Fundacao para a Ciencia e a Tecnologia (193.137.171.XX)... Selecting best server based on ping... Hosted by Vodafone PT (Porto) [56.28 km]: 12.239 ms Testing download speed........................................ Download: 80.28 Mbit/s Testing upload speed.................................................. Upload: 80.26 Mbit/s