How to check internet speed on CentOS 8 using command line

You can check your internet speed on Linux with the Python-based Speedtest-cli tool (command line interface). This article is about testing Internet speed on CentOS 8.0. You will learn how to install speedtest-cli on a desktop or CentOS 8.0 server and check your internet speed.

Install Speedtest-cli on CentOS 8

Speedtest-cli is written in the Python programming language. Open a terminal to make sure Python is installed and working correctly. Enter the following command to check your Python version:

python --version

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

Step 1. Install Python

If python is not installed on your system, you will first install python on your system. To do this, you need to run the below 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 the wget command:

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

After successfully saving the downloaded file, enter the following command in the terminal:

$ chmod +x speedtest-cli

Download speedtest-cli

Step 3. Check your internet speed

Now we will check the internet speed on your system using speedtest-cli. Enter the following command on the terminal to check your internet speed in Mbps:

$ ./speedtest-cli

Check internet speed

You can also check your internet speed in bytes. To check your internet speed in bytes, you run the following command on your terminal:

$ ./speedtest-cli --bytes

Internet connection speed in bytes

You will now generate the speed result via the url. To generate and share the results in bits, you need to run the following command on the terminal:

$ ./speedtest-cli --share

Share internet speed

To generate results in bytes, enter the following command:

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

Internet speed in bytes

In the image above, you can see that the URL was generated in the terminal. You will copy this URL and paste it into your web browser to check your internet speed.

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

Speedtest result

Conclusion

In this article, you have learned how to check internet speed with speedtest-cli on CentOS 8 from the command line. I hope this tutorial was helpful to you and you won’t have any trouble checking internet speed on your Linux system.

How to check internet speed on CentOS 8 using command line

Sidebar