Site icon Ananova Business Web Hosting

Hot plugging Tools

<< Prev. Page: Linux Device Hot plugging

udev tool

It automatically detects devices added or removed from system and generates device files for them in the /etc/dev directory. The name of the device files reflects their task like Printer device files begin with lp for ‘line print.' If more than one printer connected to the system, the number is attached after the prefix ‘lp', like lp0, lp1, lp2. The terminal device files begin with ‘tty' for ‘teletype' like tty0, tty1, tty2, and so on.

Each time the system boots, it invokes /sbin/udevstart which runs udev  and create kernel devices making device files in the ‘dev' directory. udev uses a set of rules located in the /etc/udev/rules.d file to direct the generation of device files, including any corresponding symbolic links like /dev/cdrom. The udev keeps track of currently installed devices. The rules files have ‘.rules' extension. Their name starts with numbers to establish priority. They are categorized into three general categories: names, permissions/ownership, and symbolic links.

On Red Hat, Fedora and similar distributions categories included in '50-udev.rules' primary rules file. And on Ubuntu or Debian included in '20-names.rules, 40-permissions.rules and 60-symlink.rules'. For specialized devices its 60-rules-libsane for scanners, 60-rules-libmtp for music players, 60-pcmcia.rules for PCMCIA devices, and 90-alsa.rules for a Sound driver.

Once the device file created, it runs the program:

The rules consist of a comma-separated list of fields composed of matching or assignable keys. The operators used to assign keys values are:

KEY Fields

udev Configuration


It contains global options such as:

>> Next Page: Hardware Abstraction Layer (HAL)

Exit mobile version