Home Learn Linux How to test internet speed using command line in Linux

How to test internet speed using command line in Linux

by Kiran Kumar
Published: Last Updated on
test internet speed command line

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!

You may also like

1 comment

Tim March 20, 2020 - 2:11 PM

speedtest-cli is in Arch Linux repo community so `sudo pacman -S speedtest-cli` do the job 😉

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.