I've got Debian 10 as OS and for a Project, I need my arduino to always be connected as /dev/ttyUSB0, not any other ttyUSB-number, and I need it to be connected with the 0777 rights for a script to work.

I've read some things about udev, but nothing I tried yet worked.

I tried creating


with the content

SUBSYSTEM=="tty", MODE="0777", KERNELS=="ttyUSB0"

but it does not work, even after reboot (like nothing changed). I must admit though that I do not really understand udev.

How to do this?


1 Answer 1


Have you considered not trying to force ttyUSB0 but instead creating a symlink to whatever tty is assigned? Your software then just uses the symlink.

A problem with forcing a particular tty is what if you boot without the Arduino but another device is attached? You then need to convince the other device to skip ttyUSB0.

If you would consider a symlink then something like:

ACTION=="add", KERNEL=="ttyUSB*", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="arduino"

might get you started. Check the VID and PID using lsusb or similar. To set permissions as well you can use e.g. MODE="0777" as you already have.

There is an example at https://wiki.debian.org/udev that might give more background.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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