Created
June 25, 2026 10:59
-
-
Save sepastian/ecbcd3d897c62bcf37e7b6c62a5ff478 to your computer and use it in GitHub Desktop.
Speedtest CLI using Linux tools only, requires SSH server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # Elegant way to test internet speed on the CLI. | |
| # Mostly from https://superuser.com/a/70400/256215 | |
| # | |
| # Does not require large files on a server, | |
| # but requires SSH access to a remote machine. | |
| # | |
| # Replace myserver.com with an SSH server where | |
| # $USER has acces, ideally without password, | |
| # i.e. through key exchange. | |
| # | |
| # Using `pv` between `dd` and `ssh` is optional, | |
| # but gives nice progress information. | |
| dd if=/dev/zero bs=50MB count=1 \ | |
| | pv --size 50M --timer --eta --rate --bytes \ | |
| | ssh myserver.com 'cat > /dev/null' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To go fancy, with coloured output etc.: