Live bandwidth speed tests from command-line emulators
A terminal turns a live bandwidth speed test into a repeatable command instead of a browser graphic. It is useful when troubleshooting slow downloads, comparing an office link with a backup connection, or checking whether a virtual server can move data efficiently. Command output can expose download throughput, upload throughput, latency, and the test server used.
Results describe the route at that moment, so they are not a permanent property of an internet service provider. Run tests on a wired connection, close active transfers, select a nearby server, and repeat each measurement. Wi-Fi interference, background synchronization, VPN routing, and server load can all distort a single reading.
Choose the right command-line client
speedtest-cli is a Python client for the Ookla Speedtest network. It can browse hosted endpoints, force a chosen server, use encrypted connections, and export JSON or CSV. That makes it a strong default for an internet-facing connection because it reports familiar download speed, upload speed, and ping metrics in one run.
Fast-cli is a lighter Node.js client that uses Cloudflare endpoints. It is convenient for a quick download or upload check, although it offers less control over endpoint selection and output detail. For traffic between two machines you control, iperf3 is usually better: it generates a sustained stream and reports transfer rates without involving a public speed-test service.
Any terminal emulator can run these clients, including Terminal on macOS, Windows Terminal, GNOME Terminal, iTerm2, and Alacritty. Keep the shell, user privileges, and network path consistent between runs; changing a VPN or proxy between measurements changes the experiment.
Install and run the first measurement
Install speedtest-cli in a virtual environment or with pipx to avoid altering system packages. If the command is not placed on your PATH, invoke the module directly with python3 -m speedtest.
# Linux or macOS
python3 -m pip install --user speedtest-cli
# Windows
py -m pip install --user speedtest-cli
Run the interactive client with speedtest, or request compact output for scripts. Add --secure when the endpoint supports encryption, and use --server with an identifier from the server list when you need a consistent destination.
speedtest --simple
speedtest --secure
Server discovery matters because a distant test server can make a healthy connection look slow. List local endpoints, inspect their latency, and pin a close one for repeat tests. Machine-readable output is useful when measurements feed into a report.
speedtest --list
speedtest --server 12345
speedtest --json
Compare the available testing methods
These clients measure different layers of the network. A hosted speed test estimates the capacity of the route to a selected internet server, while iperf3 measures the path to an endpoint under your control. A large-file transfer through curl measures an HTTP server and can be shaped by caching or compression.
| Tool | Best fit | Typical output | Main limitation |
|---|---|---|---|
speedtest-cli |
Public internet path | Download Mbps, upload Mbps, and ping | Controlled by public server availability |
fast-cli |
Quick Cloudflare check | Download or upload throughput | Limited server choice |
iperf3 |
Two endpoints you control | Sustained transfer rate | Requires a reachable partner |
curl |
Known HTTP endpoint | Bytes per second for one transfer | Depends on file and server behavior |
For routine ISP or office-link checks, speedtest-cli is the most convenient choice. Use iperf3 when comparing a workstation with a VPS or local host, because it isolates throughput from public-server conditions. Use curl for a controlled object-store or CDN file, and treat its value as an application-level measurement rather than a replacement for a full speed test.
Interpret throughput, latency, and errors
Read the units before comparing results. Mbps is megabits per second, while many download managers display MB/s or megabytes per second; divide by eight to convert. A 100 Mbps connection therefore carries about 12.5 MB/s in ideal conditions. Lower upload results are common when the client has a slower upstream path.
Latency shows delay to the selected server, not the full round trip through every website you use. A high or unstable ping can impair calls and remote sessions even when raw transfer speed looks good. Errors such as “cannot retrieve speedtest configuration” often point to endpoint, DNS, or TLS blocking rather than inadequate bandwidth.
Check those dependencies before changing settings. The CoderVortex network tools provide quick DNS and SSL checks for a first-pass diagnosis. If connectivity works but speed remains low, compare several nearby servers, test at different times, and repeat with the VPN disabled.
Build a repeatable test workflow
A dependable routine separates preparation from measurement. The first list keeps unrelated network activity from skewing the result.
Before the run
- Connect by Ethernet where possible and temporarily disable VPN or proxy routing.
- Pause streaming, cloud backup, package downloads, and large uploads.
- Choose a nearby endpoint from
speedtest --listand record its identifier. - Use the same client, server, and measurement mode for each run.
Once the path is ready, collect enough readings to identify a stable range rather than an isolated peak.
During and after the run
- Run the test at least three times, with a short pause between attempts.
- Record download Mbps, upload Mbps, latency, endpoint, and timestamp.
- Compare median results and retain outliers for troubleshooting.
Automation can preserve that sequence and create an audit trail. Each file contains the client’s measurements in a structured format, ready for comparison across locations or connection types.
for run in 1 2 3; do
speedtest --json > "speedtest-$run.json"
done
Keeping the raw output alongside a short note about the network path makes later diagnosis more reliable.