udev provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files usu- ally located in the /dev directory, or it renames network interfaces.
As part of the hotplug subsystem, udev is executed if a kernel device is added or removed from the system. On device creation, udev reads the sysfs directory of the given device to collect device attributes like label, serial number or bus device number. These attributes may be used as keys to determine a unique name for the device. udev main- tains a database for devices present on the system. On device removal, udev queries its database for the name of the device file to be deleted.