Přeskočit na hlavní obsah

Setting a permanent name for a device using udev rules in Linux

Write your post here.

Heya, today we will learn how to set a human-readable/non-changing name for a USB device in Linux :)

There are some assumptions for this guide:

  • You are using Debian, Ubuntu or similar (I used Debian)
  • You have basic command line knowledge, you don't have to know how to use vim, I use nano :)

So first, you need to identify your device. I am setting this up for a PS3 Eye camera, so I can use it with mjpeg-streamer, to have a webcam for OctoPrint. The v4l-utils package was useful to me, as it is able to list and show the descriptions of cameras.

I can run v4l2-ctl --list-devices to get my device's current /dev/video# location:

.. code-block::

   USB Camera-B4.09.24.1 (usb-0000:00:1d.7-1):
    /dev/video0

From this, I can see that my camera is currently at /dev/video0.