The Arduino IDE requires access to the serial port (/dev/ttyUSB0 on my machine) to upload a sketch to the Arduino. In a Debian Live session, the default user (“user”) doesn’t have permission to access the serial port. Possible solutions include:
- Run the Arduino IDE as root – e.g. “sudo Downloads/arduino-1.8.19/arduino”.
- Add “user” to the “dialout” group, using the “usermod” command, so that access to the serial port is granted.
Routinely running applications as “root” isn’t good practice, but method 1 also has the downside that all sketch files end up owned by “root”, which is inconvenient.
Method 2 would typically only take effect after logging out and logging back in again. However, the “su” command can be used to launch the Arduino IDE with the new group membership in effect, as shown below:
sudo usermod -a -G dialout $USER su -m $USER -c Downloads/arduino-1.8.19/arduino
Note that you will be asked to type the password (default password on Debian Live is “live”).