Check major/ minor device number in Linux

In Linux world, everything is presented as a file in /dev to users no matter it is disk, network adapter or any other devices. In the background, kernel manages all the devices. To be specific, through the device drivers in the kernel.

The devices controlled by the same device driver have a common device number which is referred as major number. The number is used to distinguish between differentdevice are called minor number.


– Check the disk, memory and mouse major/ minor device number

[jchen@fedora ~]$ ll /dev/sda1
brw-rw—-. 1 root disk 8, 1 Sep 1 09:01 /dev/sda1
[jchen@fedora ~]$ ll /dev/mem
crw-r—–. 1 root kmem 1, 1 Sep 1 09:01 /dev/mem
[jchen@fedora ~]$ ll /dev/input/mice
crw——-. 1 root root 13, 63 Sep 1 09:01 /dev/input/mice

– Check the mounted file system either mount folder (mountpoint -d <folder>) or device (mountpoint -x <device>)

[jchen@fedora ~]$ mountpoint -d /home
[jchen@fedora ~]$ mountpoint -x /dev/mapper/fedora_1004521-home
[jchen@fedora ~]$ mountpoint -x /dev/sda1



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s