Device file

A device file is an interface for a device driver that appears in a filesystem as if it were an ordinary file. They allow software to interact with a device driver. The files are in the.

Installation
To manage device files, by default, eudev is used, which will take care of any installation of said files.

Alternatives to eudev:


 * udev
 * mdev
 * static-dev
 * vdev

Creation
For each device (internal or peripheral devices) there is a device file. During kernel boot time the kernel detects the devices and creates a device file in the virtual devtmpfs filesystem. Afterwards eudev takes over the device files and restores them in. From this point on eudev is in charge to create new and to delete unavailable device files.

Information can be obtained using udevadm:

Get device info using followed by the device path

Permissions
Like other files access to device file is restricted by filesystem permissions. The permission to access a device file have to be granted first to an user:
 * Add the user to the group the device file belongs to.
 * Setup ConsoleKit to grant access to some device files (e.g. sound device files) to the user of the active, local session.

Symlinks
eudev creates for some device classes additional symlinks. The device file (first CDROM drive) and  (first DVD drive) are just symlinks to the device file  (first optical drive). You can use the symlinks in programs and config files like every other device file. Other examples are for input devices or  for storage devices.