chiark / gitweb /
efb02cc6189b7493b802556fcd47a0c44190f3cf
[elogind.git] / udev.8
1 .TH UDEV 8 "October 2003" "" "Linux Administrator's Manual"
2 .SH NAME
3 udev \- Linux configurable dynamic device naming support
4 .SH SYNOPSIS
5 .B udev
6 .SH "DESCRIPTION"
7 .B udev
8 creates or removes device node files usually located in the /dev directory.
9 As part of the
10 .B hotplug
11 subsystem,
12 .B udev
13 is exectuted if a kernel device is added or removed from the system.
14 .P
15 On device creation,
16 .B udev
17 reads the sysfs directory of the given device, to collect device attributes
18 like label, serial number or bus device number.
19 These attributes are passed as a key to the namedev subsystem
20 to receive a unique name for device file creation.
21 namedev maintains a database for devices present on the system.
22 .P
23 On device removal,
24 .B udev
25 queries the namedev database for the name of the device file to delete.
26 .P
27 namedev expects its configuration at
28 .I /etc/udev/namedev.config.
29 The file consists of a set of lines. All empty lines and
30 lines beginning with a '#' will be ignored.
31 .br
32 Every line defines the mapping between device attributes and the device file
33 name. It starts with a keyword defining the method used to match, followed by
34 one ore more keys to compare, optional ownwership and permission settings and
35 the filename for the device. If no matching configuration is found,
36 the default kernel device name is used.
37 .P
38 .I method, key,[key,...] [owner,] [group,] [mode,] name
39 .TP
40 .B LABEL
41 device label or serial number, like USB serial number, SCSI UUID or
42 file system label
43 .br
44 keys: \fBBUS\fP, \fIsysfs_attribute\fP
45 .TP
46 .B NUMBER
47 device number on the bus, like PCI bus id
48 .br
49 keys: \fBBUS\fP, \fBID\fP
50 .TP
51 .B TOPOLOGY
52 device position on bus, like physical port of USB device
53 .br
54 keys: \fBBUS\fP, \fBPLACE\fP
55 .TP
56 .B REPLACE
57 string replacement of the kernel device name
58 .br
59 key: \fBKERNEL_NAME\fP
60 .TP
61 .B CALLOUT
62 calling external program, that returns a string to match
63 .br
64 keys: \fBBUS\fP, \fBPROGRAM\fP, \fBID\fP
65 .SH "EXAMPLE"
66 .nf
67 # USB printer to be called lp_color
68 LABEL, BUS="usb", serial="W09090207101241330", NAME="lp_color"
69
70 # sound card with PCI bus id 00:0b.0 to be called dsp
71 NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
72
73 # USB mouse at third port of the second hub to be called mouse1
74 TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
75
76 # ttyUSB1 should always be called pda
77 REPLACE, KERNEL="ttyUSB1", NAME="pda"
78
79 # if /sbin/dev_id returns "V0815" device will be called dev0815
80 CALLOUT, PROGRAM="/sbin/dev_id", BUS="pci", ID="V0815", NAME="dev0815"
81 .fi
82 .SH "FILES"
83 .nf
84 .ft B
85 .ft
86 /sbin/udev                           udev program
87 /etc/udev/*                          udev config and database files
88 /etc/hotplug.d/default/udev.hotplug  hotplug symlink to udev program
89 .fi
90 .LP
91 .SH "SEE ALSO"
92 .B hotplug (8)
93 .PP
94 The
95 .I http://linux-hotplug.sourceforge.net/
96 web site.
97 .SH AUTHORS
98 udev was developed by Greg Kroah-Hartman <greg@kroah.com> with much help from
99 Dan Stekloff <dsteklof@us.ibm.com> and many others.