Major and Minor Device Numbers
There may be more than one device of the similar type on a system. For instance, a Linux system may have a multiport card (multiple serial ports) with 10 Wyse 60 terminals hanging off it. A Linux can use the similar device driver for every of the terminals since they are all the similar type of devices.
Moreover, there must be a technique for the OS to differentiate that of the 10 terminals is to be addressed. This is where device numbers are used. Two device numbers recognize each device: The main number identifies the device driver to be used and the minor number identifies the device number. For instance, the 10 Wyse 60 terminals on the multiport card can all use a device file with the similar major number, but each will have a variant minor number, thus uniquely identifying it to the OS.
In Every device on the system has both major and minor device numbers assigned uniquely. If two devices are assigned the similar number, A Linux system cannot properly communicate with them.
A few devices use the major and minor device numbers in a strange way. A few tape drives, for instance, use the minor number to identify the density of the tape and adjust its output in which manner.
Device files are establish with the command mknod (make node) and removed with the standard rm command.