To check your internet speed in terminal you can use 2 options:

sudo apt install speedtest-cli && speedtest-cli

or simply run

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -