Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Sometimes when I start the system my web camera is set on /dev/video0, and sometimes it's on /dev/video1 and the TVtuner is on /dev/video0.
I'd like to set it consistently, that one device is always on /dev/video0 and other /dev/video1, not that they interchange if I disconnect the USB or randomly on system start.

share|improve this question

You need to create a persistent udev rule, in /etc/udev/

See /lib/udev/rules.d for help on how to configure the specific rule.

I am not sure how the rule should exactly look like, however it should be similar to these network rules:

# PCI device 0x8086:0x1242 (iwlagn)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:12:ab:52:44:36",
  ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

which says that if the hardware address of the device is 00:12:ab:52:44:36, then it should use the name wlan0.

UPDATE: See and for instructions.

share|improve this answer
Is there somewhere a comprehensive manual for this? – chmi Nov 5 '11 at 23:08

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.