I am having issues uploading to my Arduino from the IDE on Ubuntu 18.04. The error message I have received is:

Arduino: 1.6.10 (Linux), Board: "Arduino/Genuino Uno" avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied

I have checked other questions similiar to this one and have tried adding myself to the dialout group running:

sudo usermod -a -G dialout username

and added permission to write:

sudo chmod a+rw /dev/ttyUSB0

After, when I run:

ls -l /dev/ttyUSB0

I get:

crw-rw-rw- 1 username dialout 188, 0 jūl  2 16:09 /dev/ttyUSB0

However,I still get the same error message from the IDE.

Any help would be greatly appreciated!

  • Also have set the port in Tools to ttyUSB0
    – Neal
    Jul 2 '18 at 13:38
  • log-out and log-in arduino.cc/en/Guide/Linux#toc6
    – Juraj
    Jul 2 '18 at 13:41
  • Are you sure it's /dev/ttyUSB0? A real Arduino will be /dev/ttyACM0. Maybe yours is a cheap chinese clone?
    – Majenko
    Jul 2 '18 at 15:00
  • Yeah just discovered it is a CH340G chip. Any hope of still getting it to work? Have heard of people having success on Windows but haven't found any good troubleshooting for Linux.
    – Neal
    Jul 2 '18 at 17:56
  • Were you able to make it work?
    – user171780
    Sep 21 '18 at 14:20

As mentioned on the official guide for Linux, you need to run

sudo usermod -a -G dialout <username>

with the <username> replaced with the username of your system. After running this, log out and log in and you should be good to go.


Arduino has added a script to the install to fix this problem. I found it after much annoyance trying to get it to work with all these suggestions.

In the arduino-1.8.8-linuxarm.tar.xz file that you download is a script called arduino-linux-setup.sh

run that from commandline with your user name ./arduino-linux-setup.sh <username>

It'll ask for the root password, and then ask you to reboot. After that you won't have any more port trouble.



When you run

ls -l /dev/ttyUSB0

you have

crw-rw-rw- 1 username dialout 188, 0 jūl  2 16:09 /dev/ttyUSB0

The Problem is you have the dev as <username>, try to change to as root

sudo chown root:dialout -R /dev/


One thing after your plug your USB, check your port with follow

ll /dev/tty*

if you can see my port as ttyUSB0 or with difference name (i.g ttyUSBx / ttyACMx ).
and then try to compile your sketch with following,

cd /path/your/arduino/installation/
cd /path/your/sketch/
$ARDUINO-INO/arduino --verify sketch.ino --board arduino:avr:uno --port /dev/ttyUSB0 --verbose //compile your sketch.ino with arduino uno board.  

enter image description here

Hope this helps.


the answer is here : https://www.arduino.cc/en/Guide/Linux

"Please Read... It might happen that when you upload a sketch - after you have selected your board and the serial port -, you get an error Error opening serial port ... If you get this error, you need to set serial port permission. Open Terminal and type:

ls -l /dev/ttyACM*

you will emphasized textget something like:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The "0" at the end of ACM might be a different number, or multiple entries might be returned. The data we need is "dialout" (is the group owner of the file). Now we just need to add our user to the group:

sudo usermod -a -G dialout <username>

where is your Linux user name. You will need to log out and log in again for this change to take effect."*

  • 1
    you only repeat some of the existing answers
    – Juraj
    Aug 8 at 16:01

The only way I could install the IDE and pass the programs without giving permission error, in an Ubuntu 18.4, using make.

See this answer to How to install latest Arduino IDE?.

  • 1
    this is not an answer to this Question about permission to tty port
    – Juraj
    Oct 24 '18 at 14:21

I'm running Arduino IDE on Ubuntu Studio. My board is a Chinese Arduino NANO. At first I tried to install the IDE from the software manager. I got the same errormessage en tried all the chmod and chown tricks but none of them worked. I came across a solution witch was to remove my IDE and replace it with de provided software from the arduino.cc site.

I was able to connect to /dev/ttyUSB0 but got a 'sync' errormessage... I chose Arduino NANO as board and the ATmega328P(Old Bootloader) as processor. It all worked out fine for me.

Hopefully this will help you guys.

  • it is a different problem
    – Juraj
    Aug 8 at 15:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.