pi command not found

In this troubleshooting guide we learn how to fix pi command not found error message

Introduction

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

pi: command not found

or when using sudo you get the following error message

sudo: pi: command not found

Solutions to pi: command not found

How To Fix pi: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pi is provided by pi package.

pi is:

This program computes Archimedes’ constant Pi to arbitrary precision. It is extremely fast and the precision is only limited by your machine’s main memory.

This is a teaser for the CLN library, to which the actual computation is delegated. You may use these decimal digits as random digits or search them for hidden messages. :-)

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

sudo apt-get -y install pi

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

You can also use apt command to install pi.

sudo apt -y install pi

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

sudo aptitude install pi

Summary

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