The concept of major and minor
Linux has always enforced device file identification by a unique identifier, composed of two parts, a major and a minor. While other file types (links, directories, and sockets) may exist in /dev
, character or block device files are recognizable by their types, which can be seen using the ls -l
command:
$ ls -la /dev crw------- 1 root root 254, 0 août 22 20:28 gpiochip0 crw------- 1 root root 240, 0 août 22 20:28 hidraw0 [...] brw-rw---- 1 root disk 259, 0 août 22 20:28 nvme0n1 brw-rw---- 1 root disk 259, 1 août 22 20:28 nvme0n1p1 brw-rw---- 1 root disk 259, 2 août ...