speedtest-cli is the official command-line interface for testing internet bandwidth using Speedtest.net infrastructure. It measures download speed, upload speed, and latency to servers worldwide, making it essential for verifying ISP performance and troubleshooting network issues.
📑 Table of Contents
Key Features
- Download/Upload Tests – Measure actual throughput
- Server Selection – Choose from thousands of servers
- JSON Output – Machine-readable results
- Scripting Friendly – Perfect for monitoring
Installation
# Install via pip
pip install speedtest-cli
# Or system package
sudo apt install speedtest-cli
Basic Usage
# Basic test
speedtest-cli
# Simple output
speedtest-cli --simple
# List nearby servers
speedtest-cli --list
# Test specific server
speedtest-cli --server 1234
# JSON output
speedtest-cli --json
# Only download test
speedtest-cli --no-upload
Was this article helpful?