Home Linux ServerTools Test network speed with SpeedTest CLI on Linux

Test network speed with SpeedTest CLI on Linux

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

When you are too familiar with testing the network speed on a computer with an operating system with a user interface such as Windows, MacOS, Ubuntu … simply access the speedtest.net link and check.

mobile

But what about servers and VPS running operating systems that do not support user interfaces, but only use them via SSH? Please continue reading this article.

II. Install Speedtest CLI on Linux

To install Speedtest CLI on Linux, you follow these 3 steps below.

Step 1: SSH into your server

To install Speedtest CLI on Linux, you need to SSH or access VPS/Server as root first. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSH, we continue with step 2 to run commands to install Speedtest CLI on Linux.

Step 2: Commands to install Speedtest CLI on Linux

Depending on the operating system your server is using, choose the appropriate commands.

For Ubuntu/Debian OS:

AZDIGI Tutorial
sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
export DEB_DISTRO=$(lsb_release -sc)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | sudo tee  /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get install speedtest

For Fedora/Centos/Redhat OS:

AZDIGI Tutorial
sudo yum install wget -y
wget https://bintray.com/ookla/rhel/rpm -O bintray-ookla-rhel.repo
sudo mv bintray-ookla-rhel.repo /etc/yum.repos.d/
sudo yum install speedtest -y

For FreeBSD OS:

AZDIGI Tutorial
sudo pkg update && sudo pkg install -g libidn2 ca_root_nss
sudo pkg add "https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-freebsd.pkg"

I’m using CentOS 7 so I will use the commands in the “For Fedora/Centos/Redhat OS” section.

Below is the image after performing the installation commands for CentOS.

install Speedtest CLI on Linux - how to install

So we have installed Speedtest CLI on Linux successfully. We continue to step 3 to learn how to use it.

Step 3: How to use Speedtest CLI on Linux

First, you will enter the command speedtest to accept the terms of use and then Speedtest CLI automatically finds the most suitable server for speed testing. When asked to accept the terms of use, type YES then press Enter button.

However, when you use it for the first time, you may encounter an error [error] Server Selection - Failed to find a working test server. (NoServers). The simple fix is to turn off the firewall or open PORT IN/PORT OUT 8080.

install Speedtest CLI on Linux - how to install

Here is the first speed test, after I opened PORT IN 8080.

image 82

Also if you want to test the speed with another server, you need to use the speedtest -L command to see the list of servers closest to you.

install Speedtest CLI on Linux - how to install

Then using the speedtest -s ID (ID will correspond to the sequence of numbers that the server you need to check).

As below, I will check with the Viettel Network server in Hue.

install Speedtest CLI on Linux - how to install

After the test, you also have a link to you can share the results with everyone.

If you want to check with servers in other regions, you can find the ID at the following link:

III. Summary

So AZDIGI has shown you how to install Speedtest CLI on Linux, as well as how to quickly test the speed of your VPS or server connection.

Hope this article will be of help to you.

Wishing you success!

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign