Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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've got a few camera's for use in Zoneminder. But they tend to switch places upon boot. One tiem camera a will get /dev/video0, the other time it will be /dev/video1.

Is there a way to set these filenames, to make them permanent?

share|improve this question
up vote 1 down vote accepted

Yes, it is possible, with the help of udev rules. See /etc/udev/rules.d (in Debian based distros).

Basically, you can bind the device to a name using vendor and other information available on the device via USB interface. $ lsusb and $ usb-devices help you determining the correct information about your devices. And udev documentation helps with the actual rule syntax.

share|improve this answer

If you have a small number of known cameras, the best approach for writing a udev rule is probably to use the serial numbers to distinguish them (as this will work even if they are the same model).

I have found this reference really good for getting started with udev.

share|improve this answer

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.