How to get Ookla’s Speedtest CLI on Windows/Ubuntu/macOS?
How to Get Ookla’s Speedtest CLI on Windows, Ubuntu, and macOS
Ookla’s Speedtest CLI is a command-line tool that allows users to check their internet connection speed directly from the terminal. It provides a quick and reliable way to measure download and upload speeds, as well as ping latency. In this guide, we will cover how to install and use Ookla’s Speedtest CLI on three major operating systems: Windows, Ubuntu (Linux), and macOS.
Why Use Speedtest CLI?
Using Ookla’s Speedtest CLI provides several advantages, especially for those who work in a terminal environment:
Automation: You can integrate speed tests into scripts or schedule regular checks to monitor network performance.
Flexibility: The CLI allows you to choose specific servers for testing and provides detailed output.
No GUI Required: Ideal for headless servers or remote systems where a graphical interface is unavailable.
Now, let’s walk through the installation and usage process for each platform.
Installing Speedtest CLI on Windows
For Windows users, installing Speedtest CLI is straightforward. Follow these steps to get started.
Step 1: Download the Speedtest CLI for Windows
Open your browser and visit the official Speedtest CLI download page.
Scroll down to the Windows section.
Download the Windows 64-bit or 32-bit binary depending on your system architecture.
Step 2: Install Speedtest CLI
Once the file is downloaded:
Extract the ZIP file to a folder of your choice.
Open Command Prompt or PowerShell.
Step 3: Add Speedtest CLI to the System Path (Optional)
To use Speedtest CLI globally from any directory, add its location to the system’s environment variables:
Right-click on This PC or My Computer and select Properties.
Click Advanced system settings.
Under System Properties, click Environment Variables.
In the System Variables section, find Path and click Edit.
Add the folder path where you extracted the Speedtest CLI binary.
Now you can run the Speedtest CLI from any command line window.
Step 4: Run Speedtest CLI
To check your internet speed, simply type:
speedtest
This will run a speed test using the nearest server.
Installing Speedtest CLI on Ubuntu
For Linux users, including Ubuntu, Ookla provides a package repository that simplifies the installation process.
Step 1: Install Required Dependencies
Before you can install the Speedtest CLI, ensure that your system is up to date:
sudo apt update
sudo apt upgrade
Step 2: Add Ookla’s Official Repository
To add the official Speedtest repository to your Ubuntu system:
sudo apt install curl gnupg
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
This command adds the necessary repository and GPG key to verify the packages.
Step 3: Install Speedtest CLI
Once the repository is added, you can install the Speedtest CLI using the following command:
sudo apt install speedtest
Step 4: Run Speedtest CLI
After the installation is complete, run a speed test by typing:
speedtest
You will see the download, upload, and ping results displayed in your terminal.
Installing Speedtest CLI on macOS
macOS users can install the Speedtest CLI using Homebrew, a package manager for macOS.
Step 1: Install Homebrew (if not already installed)
If you don’t have Homebrew installed, you can install it by running:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
Follow the on-screen instructions to complete the installation.
Step 2: Install Speedtest CLI via Homebrew
Once Homebrew is installed, you can install Speedtest CLI by typing:
brew install speedtest-cli
This will download and install the tool.
Step 3: Run Speedtest CLI
To check your internet speed, simply run:
speedtest
The CLI will connect to the nearest server and provide your internet speed metrics.
Advanced Usage and Options
The Speedtest CLI offers several advanced options that allow you to customize the testing process. Here are some useful commands:
Specify a Server
If you want to test against a specific server rather than the nearest one, you can use the –server flag:
speedtest –server
To get a list of available servers and their IDs, run:
speedtest –servers
Output in JSON Format
For automation or logging purposes, you may want to output the results in JSON format. Use the –format option:
speedtest –format=json
Display Help
To see all available options, run:
speedtest –help
Conclusion
Ookla’s Speedtest CLI is a versatile tool that allows you to check your internet connection speed from the command line. Whether you’re using Windows, Ubuntu, or macOS, the installation process is quick and straightforward. Once installed, you can easily test download and upload speeds, as well as latency, all from your terminal. The advanced options also make it a powerful tool for network monitoring and automation.
By following this guide, you’ll be able to install and start using Speedtest CLI on your preferred operating system, helping you monitor and troubleshoot your internet connection efficiently.