How to test internet speed using command line in Linux

Guide to check your internet speed via command line in popular Linux distros

Today, we will learn how to test internet speed from the command line via Terminal in various popular Linux distributions including Ubuntu, Fedora, and Arch Linux. Note that since internet speed is measured by actually uploading and downloading from a server, you need to install a third party utility which will download and upload test data to its server, measuring the transfer speed. Let’s get started.

Testing Internet Speed in Ubuntu, Linux Mint, and elementary OS

This guide is tested on Ubuntu 17.10, but should work on older versions, and also in Ubuntu derivatives including Linux Mint, elementary OS, etc..

Step 1) Launch ‘Terminal’.

Step 2) I recommend installing ‘Speed test’ command line utility which has been around for a while and trustworthy. Use this command:

sudo apt install speedtest-cli

You must enter the root password to complete installation.

Step 3) After the installation is complete, go ahead and start testing the internet speed. Use the command command in the Terminal.

speedtest

Output:

Retrieving speedtest.net configuration...
Testing from Time Warner Cable (xxx.xx.xxx.xx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by BrescoBroadBand (Columbus, OH) [xx km]: xxx ms
Testing download speed................................................................................
Download: 18.62 Mbit/s
Testing upload speed................................................................................................

Testing Internet Speed in Fedora and derivatives

This guide is tested on Fedora 27, but should work on older versions too.

Step 1) Launch ‘Terminal’.

Step 2) We shall use the same utility ‘Speedtest’ in Fedora too. Speedtest utility is written in Python, and so you need to first install Python in your computer.

sudo dnf install python

Step 3) Install speedtest utility:

sudo dnf install speedtest-cli

Step 4) Launch the utility:

speedtest-cli

Output:

Internet speed test Fedora 27 Terminal
Internet speed test Fedora 27 Terminal

Testing Internet Speed in Arch Linux, Manjaro, and derivatives

This guide is tested on Manjaro 17, but should work on older versions, Arch Linux, and derivatives too.

Step 1) Launch ‘Terminal’.

Step 2) Enter the following command to download ‘Speedtest’ utility using wget command.

wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

Step 3) Make the downloaded content executable using chmod +x command.

chmod +x speedtest-cli

Step 4) Finally launch Speedtest to test your internet speed.

./speedtest-cli

Speedtest installation and internet speed test in Manjaro 17.0.2 GNOME terminal
Speedtest installation and internet speed test in Manjaro 17.0.2 GNOME terminal

That’s it!

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities, especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. I hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,241FansLike
394FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

MUST READ

The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.
The wait is finally over (almost) for all you Ubuntu fans out there. The latest version of Ubuntu, 20.10 codenamed "Groovy Gorilla," is currently available in the beta version. I have tested out the distro myself, and it is stable enough to take out for a spin.

5 Things to do when your Linux system GUI freezes

All operating systems freeze at some point and, Linux distributions are no exceptions. In this post, we are going to look at five methods you can apply to your frozen system before thinking of plugging out the power cable or holding down the power button to power off the PC.

Ubuntu 19.10 (Eoan Ermine) Beta Installation and Overview

It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.

Top 5 reasons to switch from Windows to Linux right now

Do you love Windows or Linux? Being on a Linux website, it's not hard to take a guess, but what are the strong reasons to switch to Linux? Linux is a 100% free OS. Is that reason alone enough? Let's find out! Never have there been more compelling reasons to make the switch. Here are just five great reasons for users to create that magical move from the wayward world of Windows to the lauded land of Linux.

6 Best CPU Stress Test and Performance Benchmark Linux Tools

Do you want to push your Linux system to its maximum limits? Or are you interested in evaluating your Linux PC in terms of performance? Either way, benchmark apps and stress test tools can give you a quantitative understanding of the performance of your Linux PC.