Recently, I installed Ubuntu 19.04 because I have some issue with Windows 10. I ran Arduino IDE without any issue, especially uploading my sketch to Arduino. When I start using Arduino IDE on Ubuntu, I have a problem uploading my sketch. It keeps me getting an error message.
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied.
I found this solution to open Terminal and enter some commands below.
sudo usermod -a -G tty haniffurqonh
sudo usermod -a -G dialout haniffurqonh
sudo chmod a+rw /dev/ttyACM0
sudo chmod a+rw /dev/ttyACM1
The solution works well, but I have to enter the command each time I turn on my laptop.