August 27, 2024

Test internet speed from command-line interface with speedtest-cli

If we do a search in the repository, apropos prints:

$ apropos -a test speed 
openssl-speed (1ssl) - test library performance
speedtest (1)        - Command line interface for testing internet bandwidth using speedtest.net
speedtest-cli (1)    - Command line interface for testing internet bandwidth using speedtest.net

which shows that the programmespeedtest-cli is in the repository of Trisquel GNU/Linux.

To install speedtest-cli, open the terminal and run:

$ sudo apt install speedtest-cli 

Then run speedtest-cli using the option --secure to use HTTPS instead of HTTP1:

$ speedtest-cli --secure
Retrieving speedtest.net configuration...
Testing from M247 Europe (146.70.117.75)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ropa GmbH & Co. KG (Frankfurt) [3.81 km]: 31.774 ms
Testing download speed................................................................................
Download: 8.84 Mbit/s
Testing upload speed......................................................................................................
Upload: 20.47 Mbit/s

You can shorten this command by creating an alias which uses the option --secure. Again in the terminal, type:

$ echo "alias speedtest='speedtest-cli --secure'" >> .bash_aliases

This command will create a file .bash_aliases, if the file does not exist.

>> will append the newly created alias after any text the file might already contain, for example, other aliases. > would replace the content of that file before it populates it with the output of echo (i.e. the string in between the quotes ” “).


  1. Source: manpage of speedtest-cli↩︎


personal computing command-line interface (cli) gnu linux trisquel wiki

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88