Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with a Linux/Ubuntu Desktop machine. The machine is used as a part of a larger setup (a autonomous boat) that relies on four USB-Devices. Three of them are plugged into an USB Hub and one is plugged directly into the machine.

Every time we reconnect the Device or restart the computer the devices may get a different device number. That is a big problem for us because to initialize those devices from our software we need their location.

Is there a solution from the side of the operating system to assign certain numbers to them or use a link or something to make sure they are always accessible in the same way from the software?

If there is only a programmatic solution maybe the question can be moved to

share|improve this question
up vote 3 down vote accepted

You should write udev rules that assign a persistent symlink to the device when they are connected. See this tutorial for writing udev rules for more information.

share|improve this answer

I don't know about Ubuntu, but Red Hat has a symbolic link: /dev/disk/by-label/ that points to the actual device file.

You might also want to look into udev; that can also do what you're looking to do.

share|improve this answer
I don't think the OP said they were disks... – Joe Jun 19 '09 at 21:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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