814
I recommend the speedtest-cli tool for this. I created a blog post (Measure Internet Connection Speed from the Linux Command Line) that goes into detail of downloading, installing and usage of it.
The short version is this: (no root required)
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -