How to convert uuid to dev

In most modern Linuxes, if you look in /etc/fstab you will see something like:

UUID=27fb9d06-8122-4a53-9930-97bd9fa57221 /usr ext4 defaults 1 1

This is not very helpful if you’re trying to figure out where your /usr directory is mounted… So how can you convert the UUID of a drive partition to the good old familiar /dev device name?

One way to do it is to use the findfs command – type “findfs ” then copy and paste the “UUID=…” part from fstab:

$ findfs UUID=ec31bc4a-093b-45ca-ac2d-8eb14885964d
/dev/sdb2
$ _



Another way to find out which device a UUID refers to is to ls - /dev/disk/by-uuid/

And the reverse problem – how to find out the UUID of a device is accomplished by the blkid command:

$ blkid /dev/sda1
/dev/sda1: UUID="45f2c200-bd5f-4436-b523-2beef9f628c7" SEC_TYPE="ext2" TYPE="ext3"
$ _

2 thoughts on “How to convert uuid to dev

Leave a Reply

Your email address will not be published. Required fields are marked *