How to measure internet speed on Linux server

We will preform the speed test with two programms. One is the good old speedtest from Ookla, and the second is Fast, which was launched by the well-known Netflix. Fast, like on the site, shows only the download speed. It does not work like Speedtest, where you can see the ping to the server, the location of the server, download speed and upload speed during the test. It is important to understand that Internet speed testing is always carried out between two specific servers. When testing internet speed, it is always important to choose the nearest server (in the same city, in the same country) with which to preform the test. By default, speedtest selects one of the closest servers, but you can manually select any other in any country worldwide.

How to install speedtest

We login to our server and execute the command to install the speedtest programm.

Debian/Ubuntu: apt install speedtest-cli
CentOS/RHEL: yum -y install python 
#Install python if it is not already installed on the server, then download the speedtest-cli file itself $ wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py We give the rights $ chmod +x speedtest-cli 

How to run a speed test with speedtest

We execute one of the commands, depending on which OS you use.

Debian/Ubuntu: speedtest-cli
CentOS/RHEL: ./speedtest-cli

Debian/Ubuntu

We see download speed is 91.81 Mbps and upload speed is 106.13 Mbps, which are normal values for this VDS tariff plan. It is important to keep in mind that speed measurements show approximate values.

CentOS/RHEL

Here we see that download speed is 795 Mbps and upload speed is 871 Mbps, which indicates that the server is connected on channel at speed of 1 Gigabit per second, which is standard for FirstByte dedicated servers.

How to install fast

The “fast” installation procedure is same for Debian/Ubuntu and CentOS/RHEL distributions.

Download the program and give it permission to run.

wget https://github.com/ddo/fast/releases/download/v0.0.4/fast_linux_amd64 -O fast
chmod +x fast

How to run a speed test with fast

To check the download speed, we execute only one command

./fast

Unfortunately, here we can only see the download speed, just like on the fast.com site itself.
Our favorite is still “speedtest-cli” and we recommend it to you as well!