Ubuntu Speed Test Command Line

Ubuntu Speed Test Command Line: How to Check Your Internet Speed in Terminal

If you’re using Ubuntu and want to quickly check your internet speed without opening a browser or using a graphical application, you’re in the right place. The Ubuntu speed test command line provides powerful tools that can help you perform network speed tests directly from the Terminal.

In this article, we’ll explore the best Ubuntu speed test command line tools for testing internet speed on Ubuntu, how to install them, and how to interpret the results. Whether you’re a system administrator, a developer, or just a Linux enthusiast, mastering these tools will help you monitor and troubleshoot your internet connection effectively.

Why Use the Command Line for Speed Tests?

Running speed tests from the command line has several advantages:

  • Lightweight: No need for a graphical interface.
  • Remote Access: Works on headless servers via SSH.
  • Automatable: Can be scripted or scheduled with cron.
  • Faster: Results without loading websites or ads.

Best Tools for Ubuntu Speed Test Command Line

Here are the top tools to test internet speed from Ubuntu Terminal:

  1. Speedtest CLI by Ookla
  2. Fast CLI by Fast.com
  3. nload (for real-time monitoring)
  4. iperf3 (for custom server-client tests)
  5. wget or curl (for manual download speed check)

Let’s go through each one in detail.

1. Speedtest CLI (by Ookla)

The most popular tool for command-line speed testing is Speedtest CLI, developed by Ookla—the same company that runs Speedtest.net.

How to Install:

bash
sudo apt update
sudo apt install curl -y
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt install speedtest

How to Run a Speed Test:

bash
speedtest

 

This will test download speed, upload speed, & ping to the nearest Speedtest server.

Sample Output:

vbnet

Speedtest by Ookla

Server: XYZ Telecom – 10 km
Download: 94.78 Mbps
Upload: 25.37 Mbps
Latency: 12.35 ms

Additional Options:

  • List available servers:

    bash
    speedtest --servers
  • Specify server ID:

    bash
    speedtest --server ID
  • Output as JSON (for scripting):

    bash
    speedtest --format=json

2. Fast CLI (by Netflix)

Fast.com is another reliable service for speed testing, created by Netflix. You can use their Fast CLI tool to test download speed from their servers.

Install Fast CLI:

bash
npm install --global fast-cli

Note: You’ll need Node.js and npm installed. If not, install them with:

bash
sudo apt install nodejs npm -y

Run Speed Test:

bash
fast

Example Output:

42 Mbps

It’s minimal, but fast and very accurate for download testing.

3. nload – Real-Time Bandwidth Monitor

While not a traditional speed test tool, nload is better for real-time monitoring of incoming & outgoing customer.

Install nload:

bash
sudo apt install nload

Run:

bash
nload

You’ll follow real-time graphs of download & upload traffic. Start a large file download in another terminal to monitor throughput.

Use Case:

  • See actual bandwidth usage
  • Monitor usage during large file transfers

4. iperf3 – For Advanced Testing Between Systems

iperf3 is ideal for customized speed tests between two devices (local or remote). You need to run it in both client and server modes.

Install iperf3:

bash
sudo apt install iperf3

On Server (Remote Machine):

bash
iperf3 -s

On Client (Your Machine):

bash
iperf3 -c [server_IP]

Example Output:

css
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.00 sec 1.09 GBytes 936 Mbits/sec

Use Case:

  • Testing LAN or VPS-to-VPS speed

  • Benchmarking server throughput

5. curl or wget – Basic File Download Test

If you want a rough idea of your download speed, use wget or curl to download a large test file from a fast server.

Using wget:

bash
wget --output-document=/dev/null http://speed.hetzner.de/100MB.bin

Using curl:

bash
curl -o /dev/null http://speed.hetzner.de/100MB.bin

Watch the Output:

These tools will show download progress and speed in MB/s or KB/s.

Note:

  • These are not comprehensive tests (no upload or ping).

  • They’re useful for testing performance to a specific server.

Bonus Tip: Automate Speed Tests with Cron

You can automate everyday speed tests with a cron job and save results to a file.

Step 1: Create a Script

bash
nano ~/speedtest-log.sh

Paste:

bash
#!/bin/bash
echo "$(date) - $(speedtest --format=tsv)" >> ~/speedtest-results.log

Step 2: Make It Executable

bash
chmod +x ~/speedtest-log.sh

Step 3: Add to Cron

bash
crontab -e

Add:

bash
0 9 * * * ~/speedtest-log.sh

This logs the speed test daily at 9 AM.

Interpreting the Results

Ping (Latency)

  • Measures response time to the server

  • <20 ms is excellent

  • 20–100 ms is good

  • 100+ ms can be noticeable in gaming and video calls

Download Speed

  • Most important for streaming, browsing, downloads

  • 25 Mbps+ for 4K streaming or large downloads

Upload Speed

  • Important for video conferencing, cloud uploads

  • 5 Mbps+ is decent for Zoom/Teams calls

Conclusion

Testing your internet speed from the Ubuntu command line is fast, accurate, and ideal for advanced users or administrators. Tools like Speedtest CLI, Fast CLI, and iperf3 offer powerful capabilities, from quick checks to in-depth diagnostics.

Whether you’re troubleshooting network issues, monitoring server bandwidth, or automating performance logs, these tools give you complete control—without ever leaving the Terminal.

Scroll to Top