udev.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 10 Feb 2018 01:28:53 +0200
changeset 2227 1e9323e7ec88
parent 1964 2945703c8dbd
child 2228 837f1337c59b
permissions -rw-r--r--
Removed files: I don't longer have interest on topic.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1140
diff changeset
     1
.. -*- coding: utf-8; -*-
1137
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
=======
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
 udev.
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
=======
1346
a2fbf50a43f4 Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
     6
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1553
diff changeset
     7
   :local:
1137
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
About.
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
======
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
 * http://reactivated.net/writing_udev_rules.html
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
 * http://wiki.debian.org/udev
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
 * https://wiki.archlinux.org/index.php/Udev
1553
342448057aef Add link.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1552
diff changeset
    15
 * http://wiki.gentoo.org/wiki/Udev
1552
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    16
 * http://www.crashcourse.ca/wiki/index.php/Udev
1137
161ffe7b7daf About udev.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
1964
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    18
Record udev events
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    19
==================
1551
934b45916514 Record udev events.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    20
934b45916514 Record udev events.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    21
This dump udev events to console::
934b45916514 Record udev events.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    22
934b45916514 Record udev events.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    23
  $ sudo udevadm monitor
934b45916514 Record udev events.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    24
1964
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    25
List available devices
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    26
======================
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    27
::
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    28
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    29
  $ udevadm info --export-db
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    30
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    31
View device capability with udev compatible format
2945703c8dbd List available devices
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    32
==================================================
1139
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    33
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    34
For Debian use::
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    35
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    36
  $ /sbin/udevadm info --name=/dev/sdc --attribute-walk
1140
63092b4c6d9d udevadm info
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1139
diff changeset
    37
  $ udevadm info --attribute-walk --path $(udevadm info --query=path --name=/dev/ttyUSB0)
1139
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    38
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    39
For other Linux use::
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    40
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    41
  $ udevinfo -a -p $(udevinfo -q path -n /dev/sdc)
376ff5f1c602 View device capability with udev compatible format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1137
diff changeset
    42
1552
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    43
Debugging udev rule.
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    44
====================
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    45
::
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    46
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    47
  $ sudo udevadm trigger
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    48
  $ sudo udevadm test $(udevadm info -n /dev/$DEV -q path)
a2ef410db055 Debugging udev rule.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1551
diff changeset
    49