LinuxCommandLibrary

speed-test

Measure network connection speed and latency

TLDR

Test your internet connection and ping speed

$ speed-test
copy

Print the results as JSON
$ speed-test --json
copy

Print the results in megabytes per second (MBps)
$ speed-test --bytes
copy

Print more detailed information
$ speed-test --verbose
copy

SYNOPSIS

`speed-test` [options]

PARAMETERS

`--help` or `-h`
    Displays help information about the command and its options.

`--version` or `-v`
    Displays the version number of the speed-test tool.

`--server` or `-s` [server ID]
    Specifies the server ID to use for the speed test.
Without the id command will attempt to automatically detect the nearest servers.

`--list` or `-l`
    Lists available speed test servers and their IDs.

`--bytes`
    Display values in bytes instead of bits.

`--json`
    Output the results in JSON format.

`--csv`
    Output the results in CSV format.

`--share`
    Generates and displays a shareable URL to the speedtest results.

DESCRIPTION

The `speed-test` command is a command-line tool used to measure the upload and download speed of your internet connection. It generally works by connecting to a designated speed test server, downloading a series of files of varying sizes, and measuring the time it takes to complete these downloads. Similarly, it measures upload speeds by sending data to the server. This provides estimates of your network's upload and download bandwidth and related information such as latency. The output typically includes information such as download speed, upload speed, ping (latency), jitter, and the server used for the test. Some versions also offer features like selecting a specific server, testing using different protocols, and outputting results in various formats (e.g., JSON, CSV). Using a command-line tool like `speed-test` can be advantageous for automated testing, scripting, and situations where a graphical interface is unavailable. It is typically distributed as a script, executable binary, or a module for an interpreter language such as Python.

CAVEATS

Accuracy can vary depending on server load, network congestion, and the location of the test server. Results may not always reflect the actual bandwidth available to specific applications.

EXAMPLES

Basic Speed Test:
Run a simple speed test:
`speed-test`

List Servers:
List available servers:
`speed-test --list`

Specify Server:
Test against a specific server:
`speed-test --server 1234`

JSON output:
Get output as JSON to parse in scripts:
`speed-test --json`

HISTORY

The `speed-test` command is typically implemented as a wrapper around existing speed testing services, with several independent implementations existing. Development likely began with the increased need to measure network performance from the command line, for scripting and automation. Its usage has grown in popularity as network speed and reliability have become more important.

SEE ALSO

ping(8), traceroute(8), mtr(8)

Copied to clipboard