speedtest-cli command not found

In this troubleshooting guide we learn how to fix speedtest-cli command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

speedtest-cli: command not found

or when using sudo you get the following error message

sudo: speedtest-cli: command not found

Solutions to speedtest-cli: command not found

How To Fix speedtest-cli: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu speedtest-cli is provided by speedtest-cli package.

speedtest-cli is:

Speedtest.net is a webservice that allows you to test your broadband connection by downloading a file from one of many Speedtest.net servers from around the world.

This utility allows you to use the Speedtest.net service from the command line.

Note: This tool accesses speedtest.net over http, while the web-based client uses websockets. This tool has shown to become increasingly inacurate with high-speed connections. For more information, see the readme on: https://github.com/sivel/speedtest-cli

To fix this problem, we can install more using the command below.

sudo apt-get -y install speedtest-cli

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install speedtest-cli.

sudo apt -y install speedtest-cli

Or if you have aptitude installed you can use the following command.

sudo aptitude install speedtest-cli

Summary

In this tutorial we learn how to fix speedtest-cli command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.