speedtest
Test internet connection speed
TLDR
Run a speed test
Run a speed test and specify the unit of the output
Run a speed test and specify the output format
Run a speed test and specify the number of decimal points to use (0 to 8, defaults to 2)
Run a speed test and print its progress (only available for output format human-readable and json)
List all speedtest.net servers, sorted by distance
Run a speed test to a specific speedtest.net server
SYNOPSIS
speedtest [OPTIONS]
PARAMETERS
-h, --help
Displays the help message and exits the program.
-v, --version
Shows the program's version number and exits.
-L, --list
Lists all available Ookla Speedtest servers by ID and location.
-s SERVER_ID, --server SERVER_ID
Specifies a particular server ID to run the test against. Use --list to find IDs.
-o FORMAT, --output-format FORMAT
Sets the output format. Common formats include human (default), json, json-pretty, csv, and tsv.
--share
Generates and displays a shareable image URL of the test results.
--accept-gdpr
Automatically accepts the GDPR agreement required for using the service, useful for scripting.
--accept-license
Automatically accepts the Ookla license agreement, necessary for non-interactive use.
--unit UNIT
Sets the unit of speed for results. Options are bit (for Mbps, default) or byte (for MBps).
DESCRIPTION
speedtest is a robust command-line interface tool designed for comprehensive measurement of internet connection performance. It accurately assesses key network metrics including download speed, upload speed, and latency (ping time) by establishing connections to the nearest or user-specified Ookla Speedtest servers globally. This utility proves invaluable for a variety of use cases, from diagnosing intermittent network issues and verifying Internet Service Provider (ISP) advertised speeds to proactively monitoring network stability and performance trends over time. By providing a quick, reliable, and standardized method to gauge bandwidth and responsiveness directly from the terminal, it serves as an essential diagnostic and monitoring tool for system administrators, developers, and everyday users alike.
CAVEATS
speedtest requires an active internet connection to perform tests. The accuracy of results can be influenced by local network conditions, background traffic, server load, and geographical distance to the chosen server. For first-time use, or after updates, users may need to explicitly accept Ookla's GDPR and license agreements using --accept-gdpr and --accept-license options.
OUTPUT FORMATS
The speedtest command offers versatile output options beyond the default human-readable format. Users can specify --output-format json, --output-format csv, or --output-format tsv to integrate results into scripts or data analysis tools. The --output-file option allows saving results directly to a specified file path.
SERVER SELECTION
While speedtest automatically selects an optimal server based on latency, users can explicitly choose a server using the --server option after listing available servers with --list. This is useful for testing connectivity to specific geographical locations or verifying network routes.
PRIVACY AND LICENSING
To comply with legal requirements, the Ookla speedtest CLI requires users to accept their GDPR agreement and license terms. This can be done interactively on first run, or non-interactively in scripts using the --accept-gdpr and --accept-license flags to ensure smooth automated operation.
HISTORY
The original Ookla Speedtest service began as a popular web-based application, providing a widely accessible method for measuring internet speeds. Recognizing the need for automated and scriptable testing, Ookla developed and released the official speedtest command-line interface (CLI) client. This CLI tool allows users to perform tests directly from the terminal, making it ideal for server environments, scripting, and integration into monitoring systems, thereby extending the reach and utility of the Speedtest platform beyond web browsers.