Rocky Linux 9 Install Speedtest using Python

In this guide, we’re going to walk through the installation of a simple, yet powerful tool to check your internet speed from the command line on Rocky Linux 9. The tool we are going to use is speedtest-cli, a Python script that interfaces with Speedtest.net’s service. This method is quick and avoids the security concerns associated with Adobe Flash based tests.

πŸš€ Prerequisites:

  • Ensure Python is installed on your system. Rocky Linux 9 comes with Python3 pre-installed, but let’s make sure it’s there and get the version.
  • You need wget to download the script.
  • Download and Prepare speedtest-cli: We will download the speedtest-cli script using wget and make it executable:
    wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
    chmod +x speedtest-cli
  • Check Internet Speed: Now, everything is set up. You can check your internet speed by running:
    ./speedtest-cli

    For output in bytes (rather than bits), use the --bytes option:

    ./speedtest-cli --bytes

πŸ“˜ This setup provides a quick and effective way to measure the bandwidth from your terminal without needing to use a web browser.

Scroll to Top