Download speedtest script from GitHub:
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
Make it executable:
chmod +x speedtest-cli
Run test:
./speedtest-cli
To get link with results of test as PNG image:
./speedtest-cli --share
To specify to which server connect:
./speedtest-cli --list
./speedtest-cli --server 4166