How to check internet speed test with linux command lines

Table of Contents

Checking your internet speed is important to ensure that you are getting the speeds that you are paying for. In this guide, we will show you how to check your internet speed using Linux command lines.

Required Tools

Before you can check your internet speed, you will need to have the following tools installed on your Linux system:

  • speedtest-cli: This is a command-line interface for testing internet bandwidth using the Speedtest.net service.
  • curl: This is a command-line tool for transferring data using various protocols.

To install these tools, use the following command:

				
					sudo apt-get install speedtest-cli curl

				
			

Checking Your Internet Speed

Once you have the required tools installed, you can use the speedtest-cli command to check your internet speed. To do this, simply run the following command:

				
					speedtest-cli

				
			

This will output the following information:

  • Ping: The time it takes for a packet of data to travel from your computer to the server and back.
  • Download: The speed at which data is downloaded from the server to your computer.
  • Upload: The speed at which data is uploaded from your computer to the server.

Using curl to Check Download Speed

Another way to check your internet speed is to use the curl command to download a file and measure the download speed. To do this, you can use the following command:

				
					curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip -w "Download Speed: %{speed_download} kbps\n"

				
			

This command will download a file from the specified URL and output the download speed in kilobits per second (kbps).

Using curl to Check Upload Speed

You can also use the curl command to measure the upload speed by uploading a file to a server. Here is an example command that can be used to measure the upload speed:

				
					curl --upload-file test500.zip ftp://speedtest.tele2.net/ -w "Upload Speed: %{speed_upload} kbps\n"

				
			

This command will upload the “test500.zip” file to the specified FTP server and output the upload speed in kilobits per second (kbps).

Conclusion

There are several ways to check your internet speed using Linux command lines. The speedtest-cli command is a simple way to check your internet speed, while the curl command can be used to measure both download and upload speeds. I hope this guide has helped you to understand how to check your internet speed on a Linux system.

Table of Contents

Join the thousands of websites that trust Koerge.

Subscribe

Receive WordPress tips, tricks and news straight to your inbox every week.