]> git.ipfire.org Git - thirdparty/systemd.git/blame - udev.8
[PATCH] more warning flags to the build.
[thirdparty/systemd.git] / udev.8
CommitLineData
d3db5e5e 1.TH UDEV 8 "October 2003" "" "Linux Administrator's Manual"
04db8c9e 2.SH NAME
d3db5e5e 3udev \- Linux configurable dynamic device naming support
04db8c9e 4.SH SYNOPSIS
eb13ff87 5.BI udev " hotplug-subsystem"
04db8c9e
GKH
6.SH "DESCRIPTION"
7.B udev
d3db5e5e 8creates or removes device node files usually located in the /dev directory.
eb13ff87
KS
9Its goal is to provide a dynamic device directory that contains only the files
10for devices that are actually present.
11.P
d3db5e5e 12As part of the
13.B hotplug
14subsystem,
15.B udev
eb13ff87 16is executed if a kernel device is added or removed from the system.
d3db5e5e 17On device creation,
18.B udev
eb13ff87 19reads the sysfs directory of the given device to collect device attributes
d3db5e5e 20like label, serial number or bus device number.
21These attributes are passed as a key to the namedev subsystem
22to receive a unique name for device file creation.
23namedev maintains a database for devices present on the system.
eb13ff87 24.br
d3db5e5e 25On device removal,
26.B udev
eb13ff87
KS
27queries the namedev database for the name of the device file to be deleted.
28.SH "CONFIGURATION"
d3db5e5e 29namedev expects its configuration at
30.I /etc/udev/namedev.config.
31The file consists of a set of lines. All empty lines and
32lines beginning with a '#' will be ignored.
33.br
3370fb21 34Every line defines the mapping between device attributes and the device file
35name. It starts with a keyword defining the method used to match, followed by
eb13ff87
KS
36one ore more keys to compare and the filename for the device. If no matching
37configuration is found, the default kernel device name is used.
3370fb21 38.P
eb13ff87
KS
39The line format is:
40.RS
41.sp
42.I method, key,[key,...] name
43.sp
44.RE
45where valid methods with corresponding keys are:
d3db5e5e 46.TP
47.B LABEL
48device label or serial number, like USB serial number, SCSI UUID or
49file system label
3370fb21 50.br
51keys: \fBBUS\fP, \fIsysfs_attribute\fP
d3db5e5e 52.TP
53.B NUMBER
54device number on the bus, like PCI bus id
3370fb21 55.br
56keys: \fBBUS\fP, \fBID\fP
d3db5e5e 57.TP
58.B TOPOLOGY
59device position on bus, like physical port of USB device
3370fb21 60.br
61keys: \fBBUS\fP, \fBPLACE\fP
d3db5e5e 62.TP
63.B REPLACE
64string replacement of the kernel device name
3370fb21 65.br
66key: \fBKERNEL_NAME\fP
67.TP
68.B CALLOUT
69calling external program, that returns a string to match
70.br
71keys: \fBBUS\fP, \fBPROGRAM\fP, \fBID\fP
eb13ff87
KS
72.P
73A sample \fInamedev.conf\fP might look like this:
74.sp
d3db5e5e 75.nf
76# USB printer to be called lp_color
77LABEL, BUS="usb", serial="W09090207101241330", NAME="lp_color"
78
79# sound card with PCI bus id 00:0b.0 to be called dsp
3370fb21 80NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
d3db5e5e 81
82# USB mouse at third port of the second hub to be called mouse1
3370fb21 83TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
d3db5e5e 84
85# ttyUSB1 should always be called pda
86REPLACE, KERNEL="ttyUSB1", NAME="pda"
3370fb21 87
88# if /sbin/dev_id returns "V0815" device will be called dev0815
89CALLOUT, PROGRAM="/sbin/dev_id", BUS="pci", ID="V0815", NAME="dev0815"
d3db5e5e 90.fi
eb13ff87
KS
91.P
92Permissions and ownership for the created device files may specified at
93.I /etc/udev/namedev.permissions.
94The file consists of a set of lines. All empty lines and
95lines beginning with a '#' will be ignored.
96.br
97Every line lists a device name followed by owner, group and permission mode. All values are separated by colons.
98.sp
99A sample \fInamedev.permissions\fP might look like this:
100.sp
101.nf
102#name:user:group:mode
103ttyUSB1:root:uucp:0666
104dsp1:::0666
105.fi
106
04db8c9e
GKH
107.SH "FILES"
108.nf
109.ft B
110.ft
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
114.fi
115.LP
116.SH "SEE ALSO"
eb13ff87 117.BR hotplug (8)
04db8c9e
GKH
118.PP
119The
120.I http://linux-hotplug.sourceforge.net/
121web site.
122.SH AUTHORS
123udev was developed by Greg Kroah-Hartman <greg@kroah.com> with much help from
124Dan Stekloff <dsteklof@us.ibm.com> and many others.