1 .TH UDEV 8 "October 2003" "" "Linux Administrator's Manual"
3 udev \- Linux configurable dynamic device naming support
5 .BI udev " hotplug-subsystem"
8 creates or removes device node files usually located in the /dev directory.
9 Its goal is to provide a dynamic device directory that contains only the files
10 for devices that are actually present.
16 is executed if a kernel device is added or removed from the system.
19 reads the sysfs directory of the given device to collect device attributes
20 like label, serial number or bus device number.
21 These attributes are treated as a key
22 to determine a unique name for device file creation.
23 udev maintains a database for devices present on the system.
27 queries the internal database for the name of the device file to be deleted.
29 udev expects its configuration at
30 .I /etc/udev/udev.config.
31 The file consists of a set of lines. All empty lines and
32 lines beginning with a '#' will be ignored.
34 Every line defines the mapping between device attributes and the device file
35 name. It starts with a keyword defining the method used to match, followed by
36 one ore more keys to compare and the filename for the device. If no matching
37 configuration is found, the default kernel device name is used.
42 .I method, key,[key,...] name
45 where valid methods with corresponding keys are:
48 device label or serial number, like USB serial number, SCSI UUID or
51 keys: \fBBUS\fP, \fIsysfs_attribute\fP
54 device number on the bus, like PCI bus id
56 keys: \fBBUS\fP, \fBID\fP
59 device position on bus, like physical port of USB device
61 keys: \fBBUS\fP, \fBPLACE\fP
64 string replacement of the kernel device name
66 key: \fBKERNEL_NAME\fP
69 calling external program, that returns a string to match
71 keys: \fBBUS\fP, \fBPROGRAM\fP, \fBID\fP
73 A sample \fIudev.conf\fP might look like this:
76 # USB printer to be called lp_color
77 LABEL, BUS="usb", serial="W09090207101241330", NAME="lp_color"
79 # sound card with PCI bus id 00:0b.0 to be called dsp
80 NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
82 # USB mouse at third port of the second hub to be called mouse1
83 TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
85 # ttyUSB1 should always be called pda
86 REPLACE, KERNEL="ttyUSB1", NAME="pda"
88 # if /sbin/dev_id returns "V0815" device will be called dev0815
89 CALLOUT, PROGRAM="/sbin/dev_id", BUS="pci", ID="V0815", NAME="dev0815"
92 Permissions and ownership for the created device files may specified at
93 .I /etc/udev/udev.permissions.
94 The file consists of a set of lines. All empty lines and
95 lines beginning with a '#' will be ignored.
97 Every line lists a device name followed by owner, group and permission mode. All values are separated by colons.
99 A sample \fIudev.permissions\fP might look like this:
102 #name:user:group:mode
103 ttyUSB1:root:uucp:0666
111 /sbin/udev udev program
112 /etc/udev/* udev config and database files
113 /etc/hotplug.d/default/udev.hotplug hotplug symlink to udev program
120 .I http://linux-hotplug.sourceforge.net/
123 udev was developed by Greg Kroah-Hartman <greg@kroah.com> with much help from
124 Dan Stekloff <dsteklof@us.ibm.com> and many others.