Monday, February 4, 2013

udev tip

From time to time I have to write some udev rules but I always struggle to work out which magic strings are required.

It does not help that every version of udev seems to change everything.

I have found a command for modern versions which helps work out what is required:

udevadm info -e

From there you can find out everything there is available to identify your devices.

The udev 'rule' is then a series of commands separated by a comma (,). You can test for equality with == and set properties with either = or :=. When you use := your value can not be overridden by another rule. For example:

SUBSYSTEM=="video4linux", MODE:="0666"

Will match all video devices and set the permissions to be world read write.

If you save that into a file called /etc/udev/rules.d/99-v4l2.rules
you can then apply it with the command:
udevadm trigger

There is much more which can be done but that is enough to get started. The names of the keys which can be set is actually listed in the man page man 7 udev but it be quite confusing to follow without examples.

Next time I have to work on flashcache I will try and blog about the new GOTO style rules :-(


  1. It is important to describe these news.

  2. I was working and suddenly I visits your site frequently and recommended it to me to read also. The writing style is superior and the content is relevant. Thanks for the insight you provide the readers!
    stick rpg 2

  3. My essay was causing me trouble with finals due not long after. I asked for an essay help and it was completed urgent essay writing service very quickly and well in advance of the deadline I paid for. Would use again.

  4. It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thanks
    Click Here
    Visit Web

  5. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck

  6. Our trustworthy writing platform is believed to be the best capstone project writing service among students worldwide, as we help writing capstone project of any complexity and deadlines. We can provide you with various benefits that will bring you positive outcomes such as the following

  7. Great info, thank you so much. I learn programming here in Dubai and I hope there are sites with a great info here - it is so hard to find.

  8. Being the most associated and pioneer in computerized change, Estonian is a brilliant spot for IT-related administrations with almost 5,000 IT organizations. Estonia computer programming organizations oblige more than 5.9% of the country's labor force controlled by north of 140 well-to-do business heavenly messengers, which contributes immensely to the nation's Gross domestic product. In this manner each product improvement organization Estonia makes an extraordinary commitment to the public economy>> Mobilunity

  9. Thank you for sharing this udev tip! Using udevadm info -e to gather information about devices and then crafting udev rules accordingly can indeed be very helpful. It's also good to know about the distinctions between = and := when setting properties in udev rules immaculate grid

  10. Saving such rules in a file Geometry Dash within the /etc/udev/rules.d/ directory, as you mentioned, is the standard practice