How to check internet speed from Linux Terminal
People who have decent broadband connections, it seems, have a tendency to frequently test and display their line speeds. They appear to be continually testing and re-testing, and any slight rise, no matter how meager, is something to get all excited about. However, a slight drop in the line speed, again no matter how meagre, and its panic stations and a bout of tweaking to see if there's something wrong.
Click image for larger version. 

Name:	Download 100 mb file to see what speed you will get.png 
Views:	266 
Size:	131.0 KB 
ID:	1634
Itís quite amusing really, and yes it's something that we are especially guilty of. Ever since we had BT Infinity installed, we marvel at the speed in which we can download stuff from the internet and as a result our hard drives are now packed to the gunwales with programs, Linux distros and other equally useless items.

Back to the point, though, while recently speed testing once more, we came across this handy trick for seeing how fast your download rate is from the Linux Terminal. Granted it's not rocket science, and it's certainly not earth shattering, but its fun nonetheless.

Quick. To The Terminal...

Start off by opening a Terminal session, Command Prompt or whatever you want to call it on your distro of choice. In our case, weíre using our well-abused Mint 16 Virtual Box machine. When you're ready, enter the following command:

wget -O /dev/null

Press Enter, and this will start to download a 100MB zip file, and the speed will be displayed in KB or MB per second, depending on the speed of your connection to the remote server.

Further Downloading

If you find that 100MB is a little too small to thoroughly test your connection, then you could always try the 500MB file that's located on the same sever, Just enter the following:
wget -O /dev/null
The end result is a 500MB being downloaded, and more time to get an average download speed for your line.

It's Not Exact.

Though unfortunately, although seeing something being downloaded in terms of megabytes per second is all fine and well, we do have to mention that this test isn't quite an exact science. There are a number of factors that can affect the speed of your connection, especially to this particular server.

How busy the remote server is at the time of downloading, how busy your connection is at the time of downloading and the fact that you're writing to a null device (a special file that discards the data written to it but reports a successful operation). These can all have an impact on the overall speed.

However, the speeds gained can at times be fairly accurate, and if you've just upgraded your connection from something like a 2Mbps broadband line to an all-singing, all-dancing, fiber connection, then we're pretty sure you'll love the difference. Treat as most people do when it comes to frequent speed tests: it's just a bit of fun, and a smidgen of one-upmanship.

More Terminal Testing

If that little tip whetted your appetite for more Terminal speed tests, then check out this link from NixCraft:

Here, the author goes into great detail while using a variety of different command line tools to test their connection speeds to and from various remote servers. It's quite interesting and, if nothing else, it gets you used to Terminal commands you wouldn't normally use.