speedtest

Updated: September 28, 2024

Ookla created a speedtest for CLI. Download


Table of Contents

INSTALLATION

macOS
brew tap teamookla/speedtest
brew update
brew install speedtest --force
Ubuntu/Debian
sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
# Ubuntu versions supported: xenial, bionic
# Debian versions supported: jessie, stretch, buster
export DEB_DISTRO=$(lsb_release -sc)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | sudo tee  /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
# Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using apt-get
# sudo apt-get remove speedtest-cli
sudo apt-get install speedtest 
Fedora/Centos/Redhat
sudo yum install wget
wget https://bintray.com/ookla/rhel/rpm -O bintray-ookla-rhel.repo
sudo mv bintray-ookla-rhel.repo /etc/yum.repos.d/
# Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using yum
# rpm -qa | grep speedtest | xargs -I {} sudo yum -y remove {}
sudo yum install speedtest
FreeBSD
sudo pkg update && sudo pkg install -g libidn2 ca_root_nss
sudo pkg add "https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-freebsd.pkg"

ARGUMENTS

-h, --help 			# print usage information
-V, --version 		# print version number
-v 					# log verbosity up to -vvv
-L, --servers		# list nearest servers
-s, --server-id		# specify a server to test from its id number
-o, --host			# specify a server from its hostname
-f, --format		# see table below, human readable formats.
-u, --unit 			# output unit of speeds bps/kbps/Mbps/Gbps/kibps/Mibps/Gibps
-P, --precision		# number of decimal places to use (default = 2, valid = 0-8)
-p, --progress=		# yes/no
-I, --interface=	# attempt to bind to the specified interface when connecting to servers
-i, --ip=			# attempt to bind to the specified IP address when connecting to servers

-a 					# shortcut for -u auto-decimal-bits
-b 					# shortcut for -u auto-binary-bits
-A 					# shortcut for -u auto-decimal-bytes
-B 					# shortcut for -u auto-binary-bytes

--output-header		# show output header for CSV and TSV
--selection-details # show server selection details
--ca-certificate=PATH
Format Meaning
human-readable human readable output
csv comma separated values
tsv tab separated values
json javascript object notation (compact)
json1 javascript object notation (lines)
json-pretty javascript object notation (pretty)

ERROR CODES

*[error] Error: [1] Latency test failed for HTTP*
*[error] Error: [36] Cannot open socket: Operation now in progress*
*[error] Failed to resolve host name. Cancelling test suite.*
*[error] Host resolve failed: Exec format error*
*[error] Cannot open socket: No route to host*
*[error] Server Selection - Failed to find a working test server. (NoServers)*

EXAMPLES

speedtest -u Gbps -s 14734 -P 4 	# Gbps @ 4 decimal places at celitoFiber server farm.
speedtest -s 14734 --selection-details