There comes upon every developer, a time when the glitz of the latest Graphical User Interface has no more charm and all that matters is the commands and the codes that can be executed on the Linux terminal.
But, even the best developers need to know how their application or system is performing from the perspective of the end-user. So, as the title may suggest, you will learn how to run a network speed test while being on the Linux Terminal.
The Prerequisites –
You cannot run a network speed test on a Linux terminal without having a Linux machine. Of course, not just that, you also need to have root access on that machine, while in the command prompt window.
A special set of tools/apps is now available to allow developers to run speed tests in the command line on Linux. These tools individually allow users to run various performance checks that are collectively parts of a network speed test
Speedtest CLI to test internet speed/bandwidth
Fast CLI to test internet speed, both uploads, and downloads
Color Bandwidth meter to show network speed.
These are the basic tools although there are others such as IPERF and Curl to test network speed between two devices.
The Network Speed Test
Testing Internet Speed – Speedtest CLI
Speedtest.net is one of the most popular and heavily relied upon applications used for network speed testing
Speedtest CLI is a command-line utility that uses speedtest.net to check network bandwidth speed. It can check both download and upload speeds as well as server response time.
To install speed test CLI on Ubuntu, which is a Linux based distribution, run the command below
After speed test, CLI is installed, run the following command on the terminal
Fast Cli to test upload and download speeds
Fast CLI is a command-line utility to check the download and upload speeds of your network. It is based on the fast.com website made by Netflix and a series of tests are run on Netflix’s own production servers.
The command for fast CLI installation is as below
Once installed, network speeds may be tested using the simple command below
Wget is a command-line download manager that can fetch files using HTTP, HTTPS, and FTP protocols.
The command for installing Wget
Terminal speed test (download only) will be done with the command below
The command above uses the free speed test service provided by Linode for testing their servers. You can replace the “Newark” part in the command above with any other server listed on Linode’s speed test page
You can even test your network speed in a Linux terminal when downloading videos from Youtube. Youtube-dl is a command-line utility to download YouTube files in various audio and video formats
To install Youtube Dl, run the command below on the terminal screen
Next, you will have to download a video using the command line to run a speed test. To start the download, enter the command below
You can look up the URL/embed code for any Youtube video and replace it in the command above to download videos of your own. The “/dev/null” part ensures that the video is not saved anywhere on the filesystem.
Using Color Bandwidth Meter (CBM)
The Color Bandwidth Meter (CMB) is a Linux tool that displays activity on all network interfaces. After the installation, run the tool to see network speeds in color-coded columns.
$ Sudo apt install cbm
Aria2 is a command-line download manager for Linux. It can pause and resume downloads from servers that support resuming. It also provides an option for multi-threaded downloading.
The command to install Aria2 is as follows
The speed test, on the other hand, will be completed using the commands below.
There are many other tools that can make terminal-based speed testing as exciting as the ones above. Although users and enthusiasts may share the excitement, developers working on Linux will only truly realize how much of an advantage is brought to them by the availability of these tools.
These are opensource and easily available to use on your cloud-hosted, VPS Linux servers