• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

Measuring Internet Speed On Linux With Speedtest CLI

CJ Saathoff

Published on: August 5, 2024

Categories: Linux Command Line 0

Ever thought “How to check Internet Speed via Terminal?” then you are in the right place. In we cover testing internet bandwidth with the speedtest CLI command line application. This provides a command line interface to interact with the speedtest.net service. We start with installation, basic usage, understanding the results, and advanced flags.

Table of Contents
  • Introduction To Speedtest CLI
  • Installation
  • Basic Syntax
  • Understanding The Results
  • Advanced Flags
  • Conclusion

Introduction To Speedtest CLI

Speedtest CLI is a command line application that allows you to run Internet speed tests using the speedtest.net servers. This allows Linux users like system administrators to even run speed tests from servers or other systems without a graphical environment.

Originally speedtest-cli was provided via Python pip, but that has since changed, and now provide packages that work with Linux package managers.

Installation

To install on Debian and Ubuntu

sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest

To install on RHEL, CentOS, Fedora, and other RPM distros

curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bash
sudo yum install speedtest

For other Operating Systems from FreeBSD to Windows checkout: speedtest.net/apps/cli

Basic Syntax

The basic syntax of the command is as simple as running:

speedtest

This will pick the best server based on the lowest ping time. (To observe use –selection-details)

However, if you wanted to do anything it would look like this:

Although if you wanted to do anything it would look like:

speedtest [options]

Understanding The Results

Below is an example of the results of running the speedtest command.

      Server: Whitesky Communications LLC - Chicago, IL (id: 23097)
         ISP: ProtonVPN
Idle Latency:    50.01 ms   (jitter: 1.53ms, low: 49.61ms, high: 54.81ms)
    Download:   227.60 Mbps (data used: 345.0 MB)                                                   
                100.25 ms   (jitter: 27.23ms, low: 56.02ms, high: 433.82ms)
      Upload:    19.94 Mbps (data used: 13.0 MB)                                                   
                122.62 ms   (jitter: 37.57ms, low: 53.72ms, high: 310.86ms)
 Packet Loss:     0.0%
  Result URL: https://www.speedtest.net/result/c/[the-result-ID]
  1. Server and ISP Information
    • Server is the speedtest server used in the test and ID is the speedtest server ID
    • ISP is your Internet Service Provider or VPN provider
  2. Idle Latency
    • Idle Latency is the time it takes for a packet to reach the speed test server and back.
    • Jitter is the variation in latency over time.
    • Low and High are the lowest and the highest latency observed.
  3. Download Speed
    • The max download speed of the download and the data used during that test.
    • The Latency experienced during the test.
    • Jitter is the variation in latency over time.
    • Low and High are the lowest and the highest latency observed.
  4. Upload Speed
    • The max upload speed of the download and the data used during that test.
    • The Latency experienced during the test.
    • Jitter is the variation in latency over time.
    • Low and High are the lowest and the highest latency observed.
  5. Packet Loss
    • Packet Loss is the percent of packet loss observed during the test.
  6. Result URL
    • Result URL if you would like to share the results of the speedtest you can share this URL.

Advanced Flags

Below are the flags I feel are the most useful pulled from the command’s documentation.

-L, –servers List nearest servers

-s, –server-id=# Specify a server from the server list using its id

-I, –interface=ARG Attempt to bind to the specified interface when connecting to servers

-o, –host=ARG Specify a server, from the server list, using its host’s fully qualified domain name

-p, –progress=yes|no Enable or disable progress bar (Note: only available for ‘human-readable’ or ‘json’ and defaults to yes when interactive)

–selection-details Show server selection details

-f, –format=ARG Output format (see below for valid formats)

Valid output formats: human-readable (default), csv, tsv, json, jsonl, json-pretty

-u, –unit[=ARG] Output unit for displaying speeds (Note: this is only applicable

Valid units for [-u] flag: bps, kbps, Mbps, Gbps, B/s, kB/s, MB/s, GB/s, kibps, Mibps, Gibps, kiB/s, MiB/s, GiB/s, auto-binary-bits, auto-binary-bytes, auto-decimal-bits, auto-decimal-bytes

Conclusion

Now you know internet speed tests don’t require a web browser nor a mouse, though an internet connection is required. In this post, we have discussed how to use speedtest CLI which is one way you can run a speedtest from a terminal, on servers and systems without a graphical environment. In this post, we cover installation, basic usage, understanding the results, and advanced flags.

CJ Saathoff

Embracing a lifelong passion for technology since childhood, CJ delved into the intricate workings of systems, captivated by the desire to understand the unknown. This innate curiosity led to his discovery of Linux, a revelation that resonated deeply. With more than 7 years of on the job experience, he’s honed his technical skills as a Geek and Senior Linux Systems Administrator.

Related Posts

How Curl Follows Redirects on Linux

We use curl regularly to fetch resources from websites. Unfortunately, curl doesn't follow redirects automatically. Here's how to fix that.

Using Systemctl to Enable Services on Boot on Linux

You can use the systemctl tool to start services automatically on boot. We do this using the "enable" keyword.

Symbolic Links vs Hard Links in Linux

Linux offers various methods for referencing files and directories through other files and directories, without creating copies of the original. If you have color coding enabled in your bash terminal, you might have seen some folders full of files of a different color from regular files. There’s a good chance that these are all symbolic […]

Bash Conditional Expressions: [[ vs [ vs test

In bash scripts, we use conditional statements frequently. Whether it’s in an “if fi” logic block or within a “while” or “do” loop, we evaluate statements all the time to determine whether they’re true or false, and perform various actions based on the result. True to form, there are multiple ways to do this, and […]

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA