Updated: 11 October 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
To test a server's connection from the command line, use Ookla's official Speedtest CLI or iperf3. The older Python speedtest-cli is still packaged but no longer maintained.
Ookla Speedtest CLI
cd /tmp wget https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz tar xzf ookla-speedtest-1.2.0-linux-x86_64.tgz speedtest ./speedtest # accept the licence on first run ./speedtest -L # list nearby servers ./speedtest -s 12345 # test against a chosen server ID
It shows latency, download and upload speed, and packet loss.
iperf3: test between two of your servers
apt install iperf3 # or: dnf install iperf3 iperf3 -s # on server A (port 5201 must be open) iperf3 -c SERVER-A-IP # on server B: upload to A iperf3 -c SERVER-A-IP -R # download from A
Note: A speed test measures the path to one test server at one moment. Results vary with the test server's own load and location, so test a few servers. The test traffic counts towards your bandwidth.