Skip to content

Instantly share code, notes, and snippets.

@abobija
Last active November 9, 2025 05:01
Show Gist options
  • Select an option

  • Save abobija/2721427f18d78e439fa9875cac960ffa to your computer and use it in GitHub Desktop.

Select an option

Save abobija/2721427f18d78e439fa9875cac960ffa to your computer and use it in GitHub Desktop.
ESP-IDF on Ubuntu 20.04.1

ESP-IDF on Ubuntu 20.04.1

This is commands used in youtube video

How to setup ESP-IDF on Ubuntu 20.04.1

Commands:

sudo apt update && sudo apt upgrade -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo apt install -y python3-pip
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
sudo apt install -y git wget flex bison gperf python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util
cd ~
mkdir esp
cd esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
. ./install.sh
pip install --upgrade pip
. ./export.sh
nano ~/.profile

Append next line to ~/.profile script:

. $HOME/esp/esp-idf/export.sh

To save press CTRL+X, Y, ENTER

sudo usermod -a -G dialout,tty $USER

Restart machine. If you are on virtual machine then shutdown completely and start it again.

ls /dev/ttyUSB*
cd ~/Desktop
cp -r $IDF_PATH/examples/get-started/hello_world .
cd hello_world
idf.py set-target esp32
idf.py menuconfig
idf.py build

Put ESP32 into programming mode.

idf.py -p /dev/ttyUSB0 flash
idf.py monitor

To exit monitor press CTRL+]

@impeeza
Copy link

impeeza commented Nov 9, 2025

Mate, thanks a lot for this guide, I am following it just now 2025_11_08 this was my findings:

  • Now the package python-setuptools is called python3-setuptools

  • I am using a Waveshare-S3-Zero and the tty device is /dev/ttyAMS0 I had to use the command sudo udevadm monitor -u and connect the device via USB to discover that.

  • For the command sudo usermod -a -G dialout,tty $USER to be effective you need to logoff and login again. I am not a regular linux user so that was not obvious for me.

  • After that I was able to test my new Zero board without problem, even create a small program to test the onboard RGBLED and worked flawless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment