How to test my Internet speed using the command line in Ubuntu?

Do you run an Ubuntu server? Would you like to test the speed of the server’s Internet connection? On a normal computer, you would just visit speedtest.net or a similar site, but that is harder on a server without a graphical interface. What can you do to test your Internet connection speed in Ubuntu using the command line? It is extremely easy!

If you visit www.speedtest.net, you can immediately test your download and upload speed. But, to use this service, you need to use an operating system with a graphical interface and with a browser installed. What can you do if you want to test your download and upload speeds using the Ubuntu command line? It is even easier because you do exactly the same, just without all the ads and an annoying website.

How to run a speedtest using the Ubuntu command line.

For this to work, you only need to run the following commands.

sudo apt-get install speedtest-cli
speedtest-cli

That’s it. The first command installs the speedtest program on your server/computer, and the second command runs the speedtest. You will get the results quickly and it is much faster than the website with all its information and annoying ads.

speedtest in command line ubuntu

Above I run the install command to install the required program on my server. Below I run the speedtest command to test my download speed and my upload speed.

ubuntu command line

To be honest, I am writing this article at a location with a terrible Internet connection, and you can see the proof of that above. I have a download speed of 3.61 Mbit per second and an upload speed of 0.40 Mbit per second.

How to uninstall the speedtest program?

Would you like to get rid of the speedtest? It is just as easy as it was to install the program.

sudo apt-get remove speedtest-cli

The program has now been removed from your computer/server.

Leave a Reply