Conceptual
Login

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?