UUIDs

In some environments people reference hard disks/partitions and other block devices by UUID. So instead of /dev/sda1 it’s bbe9828e-864b-22a1-bd42-191d7286d945 or something along those lines.

You may see an entry in fstab that looks like this:

UUID=bbe9828e-864b-22a1-bd42-191d7286d945 /                       ext4    defaults,noatime        1 1

To find out what device this is mapped to, we can look at /dev/disk/by-uuid/ and see where the UUIDs symlink to.

ls -aul /dev/disk/by-uuid/

In the output you should see something like this:

lrwxrwxrwx. 1 root root  11 Nov 26 16:33 bbe9828e-864b-22a1-bd42-191d7286d945 -> ../../sda1

If you want to obtain the UUID of /dev/sda1, you can use the blkid command

blkid /dev/sda1

This should return

/dev/sda1: UUID="bbe9828e-864b-22a1-bd42-191d7286d945" TYPE="ext4"
(Comments)

Comments