This small script does a fairly good Upload/download speed test of your Internet connection:
Note: This is a Python script. So you’ll need first to make sure you have Python installed in your system.
Get the script:
wget -O speedtest-cli //raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
Make it runnable
chmod +x speedtest-cli