Character Devices and Major and Minor Numbers
A character device is one you read and write as a stream of bytes, in order, with no notion of blocks or seeking around, which fits most simple hardware. The kernel identifies each one by a pair of numbers: a major number saying which driver owns it and a minor number saying which device of that driver it is. Those numbers are how a file name under the device directory gets connected to your code.
Questions this Concept answers
- Why is "character device" the right classification for most simple hardware?
Block and Character Devices in Linux
In Linux, devices are represented as files, and the two primary device-file types are block devices, which transfer data in fixed-size chunks and typically represent storage media, and character devi…