The dev directory


The device directory /dev contains device files (or nodes) for all connected hardware devices. These device files are used as an interface between the devices and the processes using them. Each device file falls into one of two categories:

Block devices: Are those in which data is read and written in blocks which can be individually addressed. Such as Hard Drives, DVDs, USB flash drives, CDs, etc.

Character devices: Are those in which data is read and written sequentially one character at a time. Examples include keyboards, the text console (/dev/console), serial ports (such as /dev/ttyS0 and so on), etc.