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 to Tim Cancel 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.

Installing multiple Linux distros on a USB drive

A bootable Linux USB drive, which also referred to as a Live USB drive, is a drive containing files that enable a computer to boot into a specific Linux distro. It is most commonly used to test-drive various Linux distros before installing on the computer for use as a daily driver.

How to install Android Studio on Ubuntu

Android Studio, like the name suggests, is a full-featured cross-platform IDE that enables you to develop Android applications to run on any android device. Based on JetBrains' IntelliJ IDEA, Android Studio comes installed with all the necessary features needed for Android development.

6 Essential Command-Line Utilities Every Linux User Should Know

Last week, we shared with you several "cool and fun" commands to get comfortable and confident with the Linux command-line. In our quest to further aid Linux users with mastery of the command line, or CLI, we present you with a variety of command-line utilities essential for all Linux users, regardless of proficiency level.

Removing the Virus from a Windows PC with a Ubuntu Live USB drive

In this tutorial, we are going to show you how to clean your Windows machine from infected viruses using an Ubuntu live USB or CD and the ClamAV antivirus. The ClamAV is a free, open-source antivirus that can be used on Ubuntu.