udev

Udev is for userspace / dev ( / dev is the device file, see Engl device = device.) and is a program with which the Linux kernel manages device files for data input and output ( I / O).

Udev replaced since kernel 2.6, the earlier used devfs file system whose tasks it takes over it. Just as devfs udev manages the / dev directory, which contains the special device files to access programs from the devices provided by the system.

With the introduction of udev were both udev and devfs included in the kernel. Since the end of June 2006 have been only udev, devfs was removed completely.

On 3 April 2012, udev added to systemd on the grounds that hotplugging is an integral part of systemd and the administrative effort of both projects as well as redundant code could be reduced by a merge.

Operation

Udev monitors and evaluates hotplug events. Find there information about a new device to this unit existing additional information is taken from the sysfs file system and creates a new device file in the / dev directory. The name used for the specific file and access permission is freely configurable by rules.

Configuration

If you install udev, we find the default rules in / etc/udev/rules.d/50-udev.rules. To apply their own rules, you should not change this file, but a newer produce smaller number, for example / etc/udev/rules.d/10-udev.rules. This ensures that these rules are first detected. If a rule is found, then this, and following any suitable applied.

Benefits

In contrast to devfs, which is integrated in the Linux kernel itself, working udev in userspace, ie is started as a normal program. The administration and naming of the connected devices is therefore no longer in the kernel, making it easier to configure.

Other advantages are:

  • Allocation of equipment is unique - there are no more problems if you change the order of two connected USB printers, for example,
  • The designation of the units can be selected by the user; it remains stable
  • To determine the device name can be any methods are used, in addition to static lists and rules, for example, the query an external database, so for example, devices within a corporate network - identified by their serial number - behave uniformly
  • The designation is Linux Standard Base compliant

Disadvantages

A conscious abgewägter disadvantage of udev is that, in contrast to devfs when calling a / dev node does not automatically loads the appropriate device driver. Does plugging a device HotPlug not right and do not load the needed drivers, this can not be recharged with udev.

789671
de