Categories: CentOSLinuxShell

How to check Internet speed on CentOS 8 using the command line

You can check the Internet speed on Linux by using the Python-based CLI (Command Line Interface) tool Speedtest-cli. This article focuses on checking the Internet speed on CentOS 8.0. You will learn how to install speedtest-cli on a CentOS 8.0 desktop or server and check the internet speed.

Install Speedtest-cli on CentOS 8

Speedtest-cli is written Python programming language. Open the terminal to make sure that Python is installed and working properly. Type the following command to check Python version:

python --version

If you get an error that python is not installed, then install Python as described in step 1. If python is already installed, proceed to step 2.

Step 1: Install python

If python is not installed on your system then first you will install python on your system. For this purpose, you need to run the below-mentioned command on the terminal to install python on CentOS 8.

$ sudo yum install python2

Step 2: Download speedtest_cli.py

Download the speedtest_cli.py file using ‘wget’ command:

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

After successfully saved the downloaded file, you will type the following command on the terminal:

$ chmod +x speedtest-cli

Step 3: Check the Internet speed

Now, we will check the internet speed on your system by using speedtest-cli. Type the following command on the terminal to check the internet speed in Mbits:

$ ./speedtest-cli

You can also check the internet speed in bytes. To check the speed of internet in bytes you will run the below-mentioned command on the terminal:

$ ./speedtest-cli --bytes

Now, you will generate the speed result through the URL. To generate and share the results in bits, you need to execute the following command on the terminal:

$ ./speedtest-cli --share

To generate the results in bytes, you will type the following command:

$ ./speedtest-cli --share --bytes

In the above-displayed image, you can see that URL has been generated on the terminal. You will copy this URL and paste it into the web browser to check internet speed.

So, enter the generated URL in the address bar. The final results will be displayed.

Conclusion

In this article, you have learned how to check internet speed using speedtest-cli on CentOS 8 on the command line. I hope this tutorial was helpful for you and you will feel no difficulty while checking the internet speed on your Linux system.

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago