How to install ESP32 esptool / on Ubuntu

The recommended way is to install the current version using pip since the version installed using apt might be out of date:

sudo pip install esptool

After that, you can use - note that you need to call it as, not just as esptool!

In case you are missing pip , install python3-dev using apt:

sudo apt -y install python3-pip