In my never ending quest to find command line only replacements for tools, I ran across this little gem.
I recorded a Screen Cast of the install and running it from a raspberry pi which will also work on a system running Ubuntu, Debian or another Debian variant.
I also tested this on my laptop which is running Archlinux.
sudo pacman -S speedtest-cli
I have not tested to see speedtest-cli is available on the CentOS repositories however if not available, you can install using the excellent instructions located at the project's GitHub page
if anyone knows how to embed screen casts from https://asciinema.org/ I would be appreciative if a link or explanation on how to do this could be added to a comment