pio command not found

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

Introduction

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

pio: command not found

or when using sudo you get the following error message

sudo: pio: command not found

Solutions to pio: command not found

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

In Ubuntu pio is provided by platformio package.

platformio is:

PlatformIO Core is a heart of whole PlatformIO ecosystem. This is a Command Line Tool that consists of multi-platform build system, platform and library managers and other integration components.

Features:

  • Multi-platform Build System
  • Development platform and package managers
  • Library Manager
  • Library Dependency Finder (LDF)
  • Serial Port Monitor
  • Integration components (Cloud & Desktop IDE and Continuous Integration).

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

sudo apt-get -y install platformio

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

You can also use apt command to install platformio.

sudo apt -y install platformio

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

sudo aptitude install platformio

Summary

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