Skip to content

How to Test Your Internet Speed Bidirectionally from Command Line Using Speedtest-CLI Tool?

Updated 1 min read

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.

Помог ли вам данный ответ?

Still stuck? Open a ticket