Terminal Speed Test on Windows, macOS and Linux
Run a speed test from the terminal on Windows, macOS or Linux with one command and nothing to install. Covers JSON output, cron, bufferbloat and alternatives.
In this article 14 sections
One command, no installer, and a verdict on what your connection can actually do
Most speed tests assume you are sitting in front of a browser. A lot of real work happens elsewhere: an SSH session to a VPS, a headless homelab box, a CI runner, a script that should log your line quality every few hours. We built a terminal speed test that runs on Windows, macOS and Linux with a single pasted command and nothing to install. This guide gives the exact commands for each system, explains how to read the output (including the bufferbloat grade), shows how to download and review the script before running it, discloses which endpoint the test talks to, and covers verification, troubleshooting, JSON output and scheduling. It also compares the approach fairly with other command line tools.
📋 What's in this guide
Why test your speed from the terminal?
A browser speed test answers the question "how fast is the connection on this laptop right now?" That is useful, but it is not the question you ask in several common situations.
If you manage a server, the connection that matters is the one the server has, not the one your desktop has. You are usually connected over SSH, with no graphical browser available. If you run a homelab, a Raspberry Pi or a small VPS, the same applies. If you want to track your home line over days to catch evening congestion, you need something a scheduler can run unattended. And if you simply live in a terminal, opening a browser tab to check your speed breaks your flow.
The usual obstacle is installation. Many command line speed tests need a language runtime, a package repository, or a download step before the first run. That is fine on your own workstation but awkward on a locked-down server or a throwaway container. Our terminal speed test takes a different route: it is a script you fetch and run. On macOS and Linux it needs a POSIX shell, curl and awk, which are commonly available. On Windows it uses PowerShell 5.1, which is built into Windows 10 and 11, and it also works in PowerShell 7.
A speed test works by moving data at full speed in both directions, so the volume depends on how fast your line is. We do not publish a fixed per-run figure for the terminal test, because it varies. As a rough estimate you can calculate yourself, a transfer at 100 Mbps for 8 seconds moves about 100 MB in that direction. Our browser test page states that it uses about 25 to 800 MB depending on speed, and a separate FAQ entry there gives roughly 10 MB on a slow connection and up to 1 GB on a gigabit line. Think twice on a metered mobile plan, a tethered phone or a capped VPS, and keep this in mind before you schedule repeated runs.
What the terminal speed test measures

The test reports the numbers most people expect from a speed test, plus a few that explain why a fast connection can still feel slow.
While the test runs you see live progress in the terminal. When it finishes, it prints a "Full report" link that points to speed.localtonet.com, which is handy if you want a nicer view. We have not documented exactly what data that link carries, so look at the link in your own run before you paste it into a chat or ticket. For comparison, the browser version keeps the numbers of a shared result in the URL fragment, the part after the #, which browsers do not send to a server.
Where the measurements go
The script header states that results are not sent anywhere, and that is the basis for our statement that results are not sent to Localtonet. The measurement itself still needs a counterpart: your machine exchanges generated test data with a test endpoint. The shell script has a default endpoint of https://speed.cloudflare.com. When the script is served from speed.localtonet.com, that line is filled in with the endpoint we have configured, and a raw copy of the file falls back to the Cloudflare default. Our browser page says its test servers are in more than 300 cities and that your browser is routed to the closest one. The security section below shows how to read the endpoint line yourself instead of taking our word for it.
This has one consequence worth stating plainly. The test measures the network path between your device and a test endpoint, which is a practical indication of how your connection performs toward large edge networks, websites and APIs. It does not measure the path to your ISP's own test server, to a game server, or to your own VPS. Different speed tests measure different routes, so do not expect two tools to agree to the last megabit.
Run the speed test on Windows
Open PowerShell. On Windows 10 and 11 that is Windows PowerShell 5.1, which is already installed. PowerShell 7 works too. If you would rather read the script before running it, jump to the section on running the script safely first. Otherwise paste this and press Enter:
irm https://speed.localtonet.com/ps | iex
irm is the short alias for Invoke-RestMethod, which downloads the script as text. iex is the alias for Invoke-Expression, which runs it. The script is wrapped in a single script block, so it does not leave functions or variables behind in your session. It embeds a small C# measurement engine, because PowerShell alone cannot read several connections at once, and it checks whether that engine is already loaded so a second run in the same session can reuse it.
Using Command Prompt instead
If you are in CMD rather than PowerShell, call PowerShell from it. The quotes keep CMD from interpreting the pipe character:
powershell -c "irm https://speed.localtonet.com/ps | iex"
What you will see
The test starts with latency samples, then runs the download phase, then the upload phase, with live progress and a changing speed figure in the terminal. During each transfer phase it also takes extra latency readings so it can compare loaded latency with idle latency. In the PowerShell engine each transfer phase runs for at least 5 seconds and at most 11 seconds, and it can finish early once the rate is stable. At the end you get the summary: download, upload, ping, jitter, the bufferbloat grade, a verdict on what the connection suits, and the "Full report" link.
The exact layout of the summary may change over time, so we do not freeze a screenshot of it here. The reading guide in the table below applies whatever the layout looks like.
| Number | What it tells you | How to judge it |
|---|---|---|
| Download (Mbps) | Receive speed. Divide by 8 for megabytes per second. | 400 Mbps is about 50 MB/s. Compare it with your plan, remembering that plans are sold as "up to" figures. |
| Upload (Mbps) | Send speed. | Many cable and DSL plans are asymmetric, so upload is often 5 to 20 times lower than download. |
| Ping (ms) | Idle round-trip time to the test location. | Under 20 ms is excellent, 20 to 50 ms is good, and over 100 ms becomes noticeable in games and calls. |
| Jitter (ms) | How much ping varies between samples. | Under 10 ms is great. Above 30 ms usually points to Wi-Fi interference or congestion. |
| Latency under load | Ping measured while the download and upload run. | On a well-managed line it barely changes. A large rise means bufferbloat. |
| Bufferbloat grade | A+ to F summary of the rise in latency under load. | See the bufferbloat section below for the grade thresholds. |
Windows options
The PowerShell script has a parameter block with two switches: -Json and -NoColor. Because a parameter cannot be passed through iex, you create a script block from the downloaded text and call it, as shown in the automation section. We have not found an IPv4 or IPv6 selector in the Windows script, so do not expect one.
Stopping a run and Constrained Language Mode
Press Ctrl+C at any time to stop the test. The script is designed to leave nothing running in the background.
The Windows script checks the session's language mode before it starts. If your PowerShell does not run in Full Language mode, which some locked-down corporate or security-hardened machines enforce, the script prints a message that the session runs in Constrained Language Mode and stops, because the measurement engine needs full PowerShell. In that case use the browser version at speed.localtonet.com instead.
Run the speed test on macOS
Open Terminal (or iTerm, Ghostty, or whatever you use) and paste:
curl -fsSL https://speed.localtonet.com/sh | sh
macOS ships with sh, curl and awk, so there is nothing to install and no Homebrew step. The curl flags are worth knowing, because they are a good habit for any download-and-run command:
-fmakes curl fail on HTTP errors instead of handing an error page to the shell.-ssilences curl's own progress meter so it does not mix with the test's output.-Sstill shows an error message if something goes wrong.-Lfollows redirects.
The output follows the same reading guide as the Windows table above. In a normal terminal you get live progress, coloring and a bar-style display. The script only draws that display when standard output is a terminal and TERM is not dumb. If your locale is not UTF-8 it falls back to plain ASCII characters, and it respects the NO_COLOR environment variable.
Options for macOS and Linux
Arguments go after sh -s --, which tells the shell to read the script from standard input and pass everything after the double dash to the script. The script header documents one option, and the environment variable is confirmed in the code.
| Option | Platform | What it does |
|---|---|---|
--json |
macOS, Linux | Prints the result as JSON for scripts instead of the live display. |
NO_COLOR environment variable |
macOS, Linux | When set to any value, turns off colored output. |
-Json |
Windows | The PowerShell equivalent of --json. |
-NoColor |
Windows | PowerShell switch that turns off colored output. |
The shell script also has a usage function. When the argument parser meets something it does not recognize, it prints the usage text to standard error and exits with status 2. An earlier version of this guide listed --ipv4, --ipv6 and --no-color for the shell script. We could not confirm those from the portion of the script we re-checked, so we no longer list them here. The usage text in your own saved copy of the script (see the next sections) is the authoritative list of what your version accepts.
Run the speed test on Linux and over SSH
On Linux the command is the same as on macOS:
curl -fsSL https://speed.localtonet.com/sh | sh
This is where a terminal-native test earns its keep. Log in to your VPS, homelab server or Raspberry Pi over SSH, paste the command, and within a short time you know what that machine's own connection can do, which is often quite different from what your laptop sees. It is also a quick way to check whether a hosting provider's advertised bandwidth is realistic from the server's point of view, or whether a VPN or tunnel on the box is slowing it down.
Requirements and minimal systems
The requirements are a POSIX shell, curl and awk. The script checks for both tools before it starts. If curl is missing it prints "curl is required" with an install hint (the example it gives is sudo apt install curl for Debian-based systems) and exits with status 1. If awk is missing it prints "awk is required" and exits the same way. On a minimal container image, curl is the usual absentee.
The script also adapts to the curl version it finds, which you can check with curl --version:
- With curl 7.63 or newer, each request reports its result the moment it finishes, so the speed figure updates live. Older builds give a less lively display.
- With curl 7.84 or newer, the server's own processing time (reported through the
Server-Timingheader) can be taken out of each ping, the same way the browser test does. On older curl builds your ping readings may therefore include a little server processing time.
If you maintain old servers, curl age is the first thing to check when live updates look sluggish or ping figures look slightly higher than the browser test shows.
Temporary files and cleanup
The script keeps its temporary files in a single directory and removes that directory when the test ends. Pressing Ctrl+C also stops the test, so an interrupted run should not leave stray processes or files on a server you care about.
Dual-stack servers
Servers with both IPv4 and IPv6 sometimes perform very differently on each. If your copy of the shell script lists IPv4 or IPv6 selection options in its usage text, you can run the test once per stack and compare. If it does not, you can still influence the address family at the system level, but be aware that this changes your server configuration beyond what a speed test should touch.
Running the script safely: inspect before you pipe
A command of the form curl ... | sh runs whatever code the URL returns, with your user's permissions. HTTPS protects the download in transit and tells you that you reached the host you typed, but it does not tell you the content is what you reviewed last month. That is true of every pipe-to-shell installer, not only ours. The sensible habit is to download the script, read it, and then run the copy you reviewed.
Download, inspect, then run
Save the script to a file
On macOS or Linux run curl -fsSL -o speedtest.sh https://speed.localtonet.com/sh. Check that curl itself exited without an error before you continue. Do this as a normal user, not as root.
Read it
Open the file with less speedtest.sh. Look at the ENDPOINT line near the top, search for any other hostnames, and confirm that the only things it writes are its own temporary directory and the terminal. You can also open the same URL in a browser.
Record a hash of what you reviewed
Run sha256sum speedtest.sh on Linux or shasum -a 256 speedtest.sh on macOS and store the output. Later you can re-download the script and compare hashes to see whether it changed before you review it again.
Run the reviewed copy
Run sh speedtest.sh for the interactive display or sh speedtest.sh --json for JSON. Because you are running a local file, no pipe is involved and the arguments go straight to the script.
curl -fsSL -o speedtest.sh https://speed.localtonet.com/sh
less speedtest.sh
shasum -a 256 speedtest.sh
sh speedtest.sh
On Windows the same approach works with the PowerShell script. Download it, read it, then build the script block from the local text so that the documented -Json and -NoColor switches still work:
irm https://speed.localtonet.com/ps -OutFile .\speedtest.ps1
Get-Content .\speedtest.ps1 | more
Get-FileHash .\speedtest.ps1 -Algorithm SHA256
& ([scriptblock]::Create((Get-Content -Raw .\speedtest.ps1)))
Calling the file through a script block this way follows the same pattern as the documented one-liner, and it also avoids a policy problem: PowerShell's execution policy can block running a saved .ps1 file directly, while your reviewed text is simply read and run as a script block. If your organization restricts that as well, the browser version is the alternative.
What the scripts do and where they connect
Reading the headers and code gives you this picture, which you can confirm in your own copy:
- Network destination. All measurement traffic goes to the
ENDPOINThost. The shell script defaults tohttps://speed.cloudflare.com, and the PowerShell script uses the same default. When a script is served from speed.localtonet.com, that line is replaced with the configured endpoint, so the file you download shows you the exact host. The PowerShell engine requests paths such as/__downfor downloads and/__upfor uploads on that host. - What is sent. The test endpoints send and receive generated data. The scripts identify themselves with a user agent of the form
localtonet-speedtest/1.0.0 (sh)in the shell version. The script header states that results are not sent anywhere. - The site address. A separate
SITEvalue points to speed.localtonet.com and is used for the "Full report" link, not for the measurement. - Local effects. The shell script uses one temporary directory and removes it at the end. The PowerShell script runs inside a single script block. Neither needs administrator rights.
- Partial downloads. Everything in the shell script starts from a main call at the very bottom, so a copy that was cut off mid-download never starts.
The speed test needs no elevated privileges, so do not run it with sudo, as root, or in an elevated PowerShell window. Use an ordinary, unprivileged account. If you need to automate it, create a dedicated low-privilege user for the scheduled job.
Firewalls, proxies and corporate policy
Because the test connects to an endpoint on the internet, outbound HTTPS to that host must be allowed. In managed environments, check your acceptable use policy before you run downloaded scripts, and ask your security team whether the endpoint host is permitted. If policy forbids downloaded scripts altogether, the browser version at speed.localtonet.com does the same job without a script. For proxies and TLS inspection, see the troubleshooting section.
Verify your first run
A speed test that silently did nothing is worse than one that failed loudly, so check a few things after your first run before you trust it or automate it.
What a healthy run looks like
- Phases in order. You see latency sampling, then the download phase, then the upload phase, each with a live speed figure on a terminal.
- A complete summary. Download, upload, ping, jitter, the bufferbloat grade and the "Full report" link all appear. A missing summary means the run did not finish.
- A named test server. The shell script carries a table of data center codes so it can show a server by city. A server near your location is a good sign that the nearest-server routing worked.
- Plausible numbers. Download and upload should be in the same range as your plan and as the browser test run on a device on the same network. Differences of 10 to 20 percent between tools are normal.
Confirm that it actually ran
With a pipe, a failed download can be easy to miss. Because curl -f prints nothing to the pipe on an HTTP error, sh then reads empty input and can finish without running a test, and the pipeline's exit status is the one of sh, not of curl. So the absence of an error message is not proof of a result. Two reliable habits:
- Look for the summary and the "Full report" link in the output.
- When scripting, use the saved-file method from the previous section, check curl's exit status when downloading, and check
echo $?after running the file. Tool errors such as a missing curl or awk exit with status 1, and unrecognized options exit with status 2. Confirm on your own system that a normal run returns 0.
Check JSON output
We do not freeze a JSON schema in this article, and we have not captured a verified sample from a real run to reproduce here, so we will not invent one. Instead, inspect the structure your version produces. Run it once and pretty-print it with a JSON tool of your choice. jq is a common one, and Python's built-in json.tool works where jq is not installed:
curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json | jq .
curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json | jq 'keys'
curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json | python3 -m json.tool
The first command prints the whole document, the second lists the top-level keys so you can see what to read, and the third is the Python alternative. On Windows, convert the text into an object and look at its members:
$r = & ([scriptblock]::Create((irm https://speed.localtonet.com/ps))) -Json | ConvertFrom-Json
$r | Get-Member
$r | Format-List *
If the JSON parses, you have the confirmation you need that the machine, the network path and the output format all work. Write your parser against the keys you actually see, and re-check them if you later save a newer copy of the script.
Troubleshooting
Most failures come from a missing tool, a blocked network path, or an environment that has no terminal. The table summarizes the common ones, and the subsections below cover the trickier cases.
| Symptom | Likely cause | What to do |
|---|---|---|
| "curl is required" or "awk is required" | The tool is not installed, common on minimal containers. | Install it with your package manager and run again. The script exits with status 1. |
| Nothing happens and no results appear | The download failed, so sh got empty input. |
Download to a file first, check curl's exit status, then run the file. |
| Error or timeout reaching the test server | A firewall or proxy blocks the endpoint host. | Read the ENDPOINT line, test that host with curl, and ask your network team to allow it. The browser page shows a similar "Test server unreachable" message when something blocks the connection. |
| Certificate errors from curl | A corporate proxy inspects TLS and re-signs certificates. | Install your organization's CA certificate in the system trust store. Do not disable verification. |
| Plain output, no colors or animation | Output is not a terminal, TERM is dumb, or NO_COLOR is set. |
Expected under cron, CI and pipes. Use --json for logs. |
| ASCII characters instead of bars and arrows | The locale is not UTF-8. | Set a UTF-8 locale in your terminal if you want the richer display. |
| Speed figure updates slowly | curl older than 7.63. | Check curl --version and update curl if you can. |
| PowerShell says Constrained Language Mode | The session is restricted by policy. | Use the browser version or an unrestricted session where policy allows. |
Blocked endpoints, firewalls and proxies
First work out which host the script talks to: open your saved copy and read the ENDPOINT value. Then test that you can reach it from the same machine, with a command such as curl -sS -o /dev/null -w '%{http_code}\n' https://speed.cloudflare.com (replace the host with the one in your copy). If curl cannot connect, the problem is the network path, not the script. Allow outbound HTTPS to that host on your firewall, or run the test from a machine that is allowed out.
Behind an HTTP proxy, curl reads standard proxy environment variables such as https_proxy and HTTPS_PROXY, so exporting them before the command is the usual approach. We have not verified how the script treats proxy settings beyond that, so read the curl options in your saved copy if proxy behavior matters. Also remember that a proxy is an extra hop: the numbers then describe the path through the proxy, not your raw line. On Windows the C# engine uses .NET's HTTP client, and whether it picks up your proxy depends on your system configuration, so test it and compare with the browser result.
TLS inspection
Some corporate networks decrypt and re-encrypt HTTPS traffic with their own certificate authority. Curl then reports a certificate verification error unless that authority is trusted by the system. The correct fix is to install the organization's CA certificate, not to pass flags that turn verification off, because that removes the protection that makes downloading a script acceptable in the first place.
cron and other places without a terminal
Under cron, in CI, or when you redirect output, there is no terminal on standard output, so the script skips the animated display and colors. That is by design. Use --json and write to a file. Cron also runs with a minimal environment, so confirm curl and awk are on its PATH (they normally live in /usr/bin), and redirect error output too (2>&1) so failures appear in your log instead of being mailed or dropped.
Windows Task Scheduler
If the log file is empty, open the task's history in Task Scheduler and look at its last run result, then run the exact command by hand in a PowerShell window. A task that runs under a different account may see different proxy settings, different language-mode policy, and a different working folder, so make sure that account can write to the log folder. Constrained Language Mode applies to scheduled runs just as it does to interactive ones.
Containers and CI
Containers keep the tool question front and center: you must install curl (and make sure awk exists) before the script can run. For example, on a Debian-based image:
docker run --rm debian:stable-slim sh -c 'apt-get update && apt-get install -y curl ca-certificates && curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json'
Treat that as a starting point and confirm it on your own image. Keep in mind what you are measuring: a container or a shared CI runner reports the network of that host and any virtual networking in between, not your office or home line. Shared runners may also have data allowances, so avoid running the test on every commit. In CI, always use --json, since there is no terminal, and fail the job explicitly if the output does not parse.
What bufferbloat means, in plain words

Speed and responsiveness are different things. A line can show a large download number and still make video calls stutter or games lag the moment someone starts a big upload. The usual cause is bufferbloat.
Think of your router (or your ISP's equipment) as a checkout queue. When data arrives faster than the link can send it, the excess waits in a buffer. A small queue is fine. A very large, unmanaged queue means that when the line is busy, every packet waits behind all the others, including the tiny, time-sensitive packets from your call or game. The line is not slower in megabits, but each packet now takes much longer to get through. Your ping, which looked fine while the line was idle, balloons whenever the line is saturated.
That is exactly what the test looks for. It measures idle latency first, then measures latency again while the download is running and while the upload is running. The increase over idle latency is the bufferbloat. Our browser test page publishes the grade thresholds, and the terminal result uses the same A+ to F scale:
| Grade | Latency increase under load | What it feels like |
|---|---|---|
| A+ | Under 5 ms | The line stays responsive even when saturated. |
| A | Under 30 ms | Very good. Calls and games should hold up. |
| B | Under 60 ms | Acceptable, with occasional noticeable lag during heavy transfers. |
| C | Under 200 ms | Noticeable lag whenever someone else uploads or streams. |
| D | Under 400 ms | Poor. Real-time use suffers on a busy line. |
| F | Beyond 400 ms | Severe. The line becomes close to unusable for real-time traffic when busy. |
The "what it feels like" column is our plain-language interpretation of the thresholds, not a separate measurement.
What to do about a poor grade
The usual remedy is a router with Smart Queue Management (SQM), typically using the fq_codel or CAKE algorithms. These keep the queue short so that small time-sensitive packets are not stuck behind bulk transfers. Whether your router supports this depends on its firmware, so check its documentation. After changing a setting, run the test again and compare the grade. If you have both Wi-Fi and a cable available, test each, because Wi-Fi problems and queueing problems can look similar from the outside.
Automating the test with JSON, cron and Task Scheduler

For scripts you want machine-readable output rather than a live display. Add the JSON option:
macOS and Linux:
curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json
Windows (PowerShell):
& ([scriptblock]::Create((irm https://speed.localtonet.com/ps))) -Json
The Windows form is different because -Json is a parameter, and a parameter cannot be passed through iex directly. Creating a script block from the downloaded text and calling it with & lets you pass -Json to it. For unattended jobs, prefer the saved and reviewed copy described in the safety section, so the job does not run newly downloaded code each time.
This guide does not list JSON field names, because we are not fixing a schema in the article. Run the JSON command once by hand, inspect it with jq or ConvertFrom-Json as shown in the verification section, and write your parser against that structure.
Choosing an interval
Data use scales with line speed. A rough way to size it: multiply your download and upload rates by the length of each phase (8 seconds per phase in the shell script, 5 to 11 seconds in the PowerShell engine) and by the number of runs per day. A line that moves about 100 MB in each direction per run would use about 800 MB per day at six runs and about 4.8 GB per day at hourly runs. Every six hours is a reasonable starting point for spotting patterns; hourly is rarely what you want on a metered or capped link.
Scheduling with cron on Linux
Cron is the simplest way to build a history of your connection quality.
Run the JSON command once by hand
Paste the JSON command into your shell and confirm that it prints a result and finishes. This confirms that curl, awk and outbound HTTPS all work from that machine before you automate anything.
Open your crontab
Run crontab -e for the unprivileged user who should own the job. Cron runs commands with sh by default, which suits a command that pipes into sh.
Add one line that appends the result to a log
Add the entry below, save and exit. It runs at minute 0 of every sixth hour and appends each result, and any errors, to a file in your home directory.
0 */6 * * * curl -fsSL https://speed.localtonet.com/sh | sh -s -- --json >> $HOME/speedtest.log 2>&1
If you saved a reviewed copy, point cron at it instead, for example sh $HOME/speedtest.sh --json >> $HOME/speedtest.log 2>&1. After the first scheduled run, read the log file to confirm it contains the JSON you saw in the manual run. Because each run appends another JSON document, jq -s . $HOME/speedtest.log reads them all into one array.
Scheduling with Task Scheduler on Windows
On Windows, Task Scheduler runs the same command through powershell.exe. Create the folder for your log first (the example uses C:\Logs).
Create a basic task
Open Task Scheduler, choose Create Basic Task, give it a name such as "Speed test", and set a trigger, for example daily and then repeating every few hours in the task's trigger settings.
Set the action to start a program
Choose Start a program, and enter powershell.exe as the program.
Paste the arguments
In the "Add arguments" field, paste the line below. The *>&1 part merges every output stream so that the result is captured regardless of how the script writes it, and -Encoding utf8 avoids the UTF-16 file that Windows PowerShell 5.1 would otherwise create.
-NoProfile -Command "& ([scriptblock]::Create((irm https://speed.localtonet.com/ps))) -Json *>&1 | Out-File -Encoding utf8 -Append C:\Logs\speedtest.log"
Run the task once manually from Task Scheduler and open the log file to check that it contains JSON. We cannot guarantee how every Windows configuration routes output from a scheduled, non-interactive session, so treat that first manual run as part of the setup, not an optional extra. If a managed machine enforces Constrained Language Mode, scheduled runs will stop for the same reason interactive ones do, and the message ends up in your log.
Getting numbers you can trust
A speed test measures the weakest link between your device and the test location. Several things besides your ISP can be that weakest link, and the terminal makes it easy to run the same test repeatedly while you change one variable at a time.
- Wi-Fi is the usual bottleneck. Walls, distance, the 2.4 GHz band and crowded channels all cut speed. Test with a cable, or stand close to the router on 5 or 6 GHz.
- Other traffic shares the line. Cloud backups, system updates, streams and game downloads use bandwidth too. Pause them for an accurate result.
- VPNs and proxies add a hop. Encryption overhead and a distant exit server lower speed and add latency. Compare a run with the VPN on and off.
- Your own machine can limit it. Old network adapters, power saving modes and some security software can cap throughput, particularly above 500 Mbps.
- Peak hours matter. Evening congestion in your ISP's network is common, which is why a scheduled log across the day is more informative than a single result.
- Differences between tools are normal. Every service measures to different servers over different routes and summarizes data differently. On our browser test page we note that differences of 10 to 20 percent between services are normal, and that larger gaps usually point to a congested route to one of the servers.
Reference figures for common activities
As a rough guide, our browser test page lists these comfortable figures per activity. Add them up if several people or tasks share the line.
| Activity | Download | Upload | Ping |
|---|---|---|---|
| HD video streaming (1080p) | 5 to 8 Mbps | Any | Any |
| 4K / UHD streaming | 25 Mbps | Any | Any |
| HD video calls | 4 Mbps | 4 Mbps | Under 80 ms |
| Online gaming | 10 Mbps | 3 Mbps | Under 40 ms, low jitter |
| Hosting a website or game server from home | Any | 10 to 50+ Mbps | Under 60 ms |
These are reference figures, not guarantees. We have not published the exact logic behind the terminal's own closing summary, so use the table as background rather than as a specification of how that summary is decided.
How this compares with other command line speed tests
We are not the only way to test speed from a terminal, and other tools make different trade-offs. Which is best depends on what you need to measure and what you are willing to install.
| Tool | What it needs | Measures against | Notes |
|---|---|---|---|
| Localtonet terminal speed test | sh, curl and awk on macOS and Linux; PowerShell 5.1 or 7 on Windows. Nothing installed. |
The configured internet speed test endpoint (Cloudflare by default in a raw copy of the script) | Download, upload, ping, jitter, latency under load, bufferbloat grade, summary, JSON option. Results not sent to Localtonet. |
| speedtest-cli | Python | Speedtest.net servers | A long-standing community tool. Its GitHub repository shows as archived by its owner on April 30, 2026 and is read-only, so check that it still suits your environment before building on it. |
| Ookla Speedtest CLI | Installation (Homebrew, apt, yum, FreeBSD packages or a direct download) | The Speedtest Server Network | Official Ookla tool. Its page lists download, upload, latency and packet loss, and output as CSV, JSONL or JSON. The Windows download is x64 only. |
| fast-cli | A package-based install. Confirm the exact runtime in its README. | fast.com | Described by its repository as a way to test download and upload speed using fast.com. The repository layout, including an .npmrc file, suggests a Node.js package. |
An honest reading of the trade-offs
Pick our terminal test when you want a result on a machine you cannot or do not want to install things on, when you want the bufferbloat grade and the loaded-latency numbers without extra tools, or when you need the same one-liner on Windows, macOS and Linux.
Pick the Ookla Speedtest CLI when you want a server network you can compare directly with Speedtest results from other devices, when you need packet loss in the output, or when you want to integrate with dashboards through its CSV, JSONL or JSON formats. The trade-off is that you install it.
Pick speedtest-cli or fast-cli if one of those test targets, Speedtest.net or fast.com, is the one you want to compare against and you are comfortable with their runtimes. Given that speedtest-cli is archived, weigh that before adopting it for new work.
We are not claiming our numbers are more correct than anyone else's. Each service measures a different route, and a test against an internet speed test endpoint tells you something different from a test against a particular ISP-hosted server. If you need the closest match to what a given provider reports, use that provider's own tool. We also have no packet loss measurement to offer, and we have not documented any option for choosing a specific test server.
Browser version and where tunnels fit
If you are on a desktop with a browser and want a visual result, the same kind of test is available at speed.localtonet.com. It runs in any modern browser, needs no account or app, and lets you copy a link to the result, copy the text, or save an image. The browser page notes that it uses about 25 to 800 MB depending on your speed, and that results are stored only in your own browser.
Hosting from home is a reason to care about upload speed in particular. Upload speed largely decides how well you can serve a local web app, a game server, a NAS or Home Assistant to the internet. If you want to publish something like that, a Localtonet tunnel is one way to do it without router port forwarding: our client on your machine makes an outbound connection to a Localtonet relay server, and the tunnel provides a public URL or host and port while it is running. For setup details, see the Localtonet HTTP tunnel documentation. A tunnel is not extra bandwidth, though. What people can pull from your service is still bounded by the upload speed this test reports, which is exactly why it is worth measuring first.
Frequently asked questions
Do I need to install anything to run a speed test from the terminal?
No installer is needed. On macOS and Linux the script needs a POSIX shell, curl and awk, which are commonly present; minimal containers often lack curl. On Windows it uses PowerShell 5.1, which is built into Windows 10 and 11, and PowerShell 7 also works. The script keeps its temporary files in one directory that it removes when the test ends.
How long does the test take and how much data does it use?
It is short: after the latency samples, the shell script runs each transfer phase for 8 seconds, and the PowerShell engine runs each phase for 5 to 11 seconds, stopping early when the rate is stable. Data use depends on your speed. As an estimate, a transfer at 100 Mbps for 8 seconds moves about 100 MB in that direction. Our browser page quotes about 25 to 800 MB, and roughly 10 MB on a slow line up to 1 GB on gigabit. Avoid running it repeatedly on metered connections.
Are my results sent to Localtonet, and which server does the test talk to?
The script header states that results are not sent anywhere, and they are calculated on your machine. The measurement traffic goes to the endpoint set in the script's ENDPOINT line. A raw copy of the script defaults to https://speed.cloudflare.com, and the copy served from speed.localtonet.com carries the endpoint we have configured. Download the script and read that line to see exactly which host your copy uses.
Which options does the script accept?
The shell script documents --json and honors the NO_COLOR environment variable. The PowerShell script has the switches -Json and -NoColor. An unrecognized option on the shell script prints the usage text and exits with status 2, so the usage text in your saved copy is the authoritative list for your version.
What does the bufferbloat grade mean, and what is a good one?
It summarizes how much your latency rises while the line is busy. A+ means the rise is under 5 ms, A under 30 ms, B under 60 ms, C under 200 ms, D under 400 ms, and F anything beyond. A or better is good for calls and gaming. A poor grade is commonly improved by a router with Smart Queue Management (fq_codel or CAKE).
Is it safe to run a command that pipes a script into a shell?
Piping runs whatever code the URL returns, so the safer approach is to download the script to a file, read it, record its hash, and run that reviewed copy as an unprivileged user. Never use sudo or an elevated session for it. If your policy does not allow downloaded scripts, use the browser version at speed.localtonet.com instead.
Can I run the test through a proxy or in a container?
Curl honors standard proxy environment variables such as https_proxy, so a proxy can usually be set that way, but the result then describes the path through the proxy. In a container you must install curl and make sure awk is present first. Either way, the numbers reflect that host's network path, not necessarily your own line.
Why does my result differ from Speedtest or Fast.com?
Each service measures to different servers over different routes and summarizes the data differently. Differences of 10 to 20 percent are normal. Larger gaps may point to congestion along one of the network paths, so repeat the test at another time and, if needed, over a cable instead of Wi-Fi.
What if PowerShell says it is in Constrained Language Mode?
The Windows script needs full PowerShell for its measurement engine, so it prints a message and stops when the session is not in Full Language mode. Use the browser version at speed.localtonet.com on that machine, or run the test from a session or device that is not restricted, where your policy allows it.
Start with Localtonet
Now that you know your real upload speed and latency, you can decide what is worth hosting from home. Create a free Localtonet account to publish a local web app or service through a tunnel, without router port forwarding.
Get Started Free →Corrections & updates
Substantive changes approved by the Localtonet editorial team are listed transparently below.
Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.