In this article, we will use a Linux command-line tool called speedtest-cli. It is written in Python and uses the website speedtest.net to check bandwidth by uploading and downloading data to and from your system.
Source: LXer – Use Speedtest CLI to test your Internet Speed on Debian 10