List UUIDs for all the devices
UUIDs have been there since Edgy, we can use the blkid command to get a list of all the drives and partitions along with their UUIDs. Open Terminal and type:
sudo blkid
Get UUID for a particular device
If we know a device label and want to confirm the UUID for to use it in /etc/fstab, here’s how we can do it using vol_id command:
vol_id -u /dev/sdb1
The UUID can be used as an identified object like /dev/sdb1 above. the syntex is:
UUID=xxxxxxxxxxxxxxxxxxxxxxxxx
Replace the xxx with actual identifier derived from one of above commands.