I use several Linux servers hosts, in which multiple serial-to-USB links are plugged in. They look like /dev/ttyUSBx devices, where x is a number starting from 0. Client devices are often rebooted or go offline or are unplugged or new ones are added. This causes ttyUSB device numbering to change constantly because each new client takes lowest unused number.

Can I somehow set client devices to have constant numbers? E.g. client A will be ttyUSB0, then client B will be ttyUSB1 and so on. And when client A is offline and client B reboots it will come back online as ttyUSB1, and there will be no ttyUSB0 (since it is offline).

PS: hosts are either Debian or Ubuntu, mostly Debian.


That is probably not possible. But you can have udev create symlinks for you when a device appears. You would not connect to /dev/ttyUSB0 any more but to e.g. /dev/ttyUSB-A.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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