How to Run Speed Test from the Command Line to Check Internet Connection Speed
The excellent curl and wget tools provide for a simple way to test the speed of an internet connection directly from the command line. Curl is bundled with most unix variations, but Mac users who want to use the wget trick will first need to grab wget for OS X in order for this to work, wget is a simple terminal utility used to download files from the web and ftp and it’s handy to have around for a variety of uses making it worthwhile to have anyway. Curl should be preinstalled on every unix flavor that is even vaguely modern, including all versions of Mac OS X and linux.