If you need to find the UUID of a hard disk in Linux, to add an entry to fstab for example, you can use the blkid command. There are many other methods available, but blkid prints the UUID with the label and disk type, and doesn’t require you to enter the path to the disk. Note that this command must be run as root.

For example, I can find the UUID of the “stuff” disk like so:

$ sudo blkid
/dev/sdb1: UUID="9b2b12c4-9893-4b76-ae0f-faff2d1625ee" TYPE="ext4"
/dev/sda1: LABEL="stuff" UUID="4a4bac24-6bb2-49df-baed-2e0aa9a6ad6b" TYPE="ext4"
/dev/sda2: LABEL="home" UUID="06000775-b63c-41b1-896a-476c3990f784" TYPE="ext4"
/dev/sdc1: UUID="29bd570f-95bc-4a93-b7c4-2c1b9bf29cca" TYPE="ext3"
/dev/sdd1: LABEL="Elements" UUID="5420AA2320AA0BD4" TYPE="ntfs"

From here it’s easy to see that the “stuff” disk is /dev/sda1 and has the UUID 4a4bac24-6bb2-49df-baed-2e0aa9a6ad6b.