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

sudo apt install speedtest-cli && speedtest-cli

or simply run

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