Conceptual
Login

How Device Files Appear Under the dev Directory

The files under the device directory used to be created by hand with a command and a pair of numbers, which meant they could be missing, stale, or point at the wrong driver. Today the kernel creates them automatically as devices register, and a user-space service gives them stable names and permissions. Knowing which part does what tells you where to look when your driver loads cleanly but no file appears for anyone to open.

Questions this Concept answers

  • Why does a driver declare a device name rather than creating the file under the device directory itself?