speedtest-cli is a commandline tool made with python that allows you to test your internet speed from the terminal using speedtest.net. It is completely opensource and released under the Apache 2.0 license. This tool allows you to perform a quick speed test, view all available servers sorted by distance, specify a server that you want to use in order to check your internet speeds, perform only a download or upload test or generate a speedtest.net share result image URL like the one below.
It has a minimalist interface which is incredibly powerful. Speedtest CLI can run on any platform; Windows, Linux, macOS and FreeBSD.
With Speedtest CLI, you can easily:
- Measure internet connection performance metrics like download, upload, latency and packet loss natively without relying on a web browser
- Test the internet connection of your Linux desktop, a remote server or even lower-powered devices such as the Raspberry Pi® with the Speedtest Server Network™
- Set up automated scripts to collect connection performance data, including trends over time
- Use Speedtest in your programs by wrapping it in the programming language of your choice
- View test results via CSV, JSONL or JSON
Installation
There are 3 ways to install speedtest-cli.
METHOD 1
Using Package manager of each distro.
Ubuntu/Debian
sudo apt-get update && sudo apt-get install speedtest-cli
Fedora
sudo dnf install speedtest-cli
CentOS & RedHat
sudo yum install speedtest-cli
FreeBSD
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"
macOS
brew tap teamookla/speedtest
brew update
brew install speedtest --force
ArchLinux
sudo pacman -S speedtest-cli
METHOD 2
It can also be installed in a distro-independent way since it is written in python by using pip or pip3 which is the python package manager. When installing the package this way, use the --user flag to perform the action only for our user.
sudo pip3 install speedtest-cli --user
METHOD 3
Cloning the GitHub repository.
git clone https://github.com/sivel/speedtest-cli
Once the repository is cloned, you can switch inside of it and issue the following command:
python3 setup.py install --user
It can be downloaded directly from the main website here.
Launching speedtest-cli
speedtest-cli can be launched from the terminal or command-line using the following command:
speedtest-cli
OR
speedtest
The application will select the closest available server to test the connection against then it willl display the download and upload speeds.
To see other available options that can be used with speedtest use the following command:
speedtest -h
This is the output
By default the speed is expressed in bits. To see the output in bytes us the --bytes option.
FAST
It is a service provided by Netflix and a minimal zero-dependency script written in GO language for testing internet download speed from the terminal. It runs on Linux, Windows and macOS. It is a great way to check whether your ISP is throttling your internet speed. It has a web interface as well as a command-line interface. It has no options so it is very simple to use. It's command line interface is available through npm.
It can be installed in 2 ways
Using npm
Downloading the binary file for your architecture.
Install using npm
sudo npm install --global fast-cli
To check your internet speed just type this command in your terminal
fast
The command returns your download speed. To get your upload speed just type fast with -u option.
fast -u
Download Binary File
Simply download the binary file for your architecture from here.
For example, if you have 64 bit architecture use fast_linux_amd64. Use this command in your terminal.
wget https://github.com/ddo/fast/releases/download/v0.0.4/fast_linux_amd64 -O fast
Afterwards, set execute permission using this command:
chmod +x fast
Run it directly from your terminal using this command.
./fast
If you happen to know any other command line tools that will be helpful for this very purpose, please leave a comment below with a little explanation.
Comments
Post a Comment
Your input is valued. Please type something....