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:
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:
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.
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.