linux: How can I view all UUIDs for all available disks on my system?
There's a tool called blkid
(use it as root or with sudo
),
# blkid /dev/sda1
/dev/sda1: LABEL="/" UUID="ee7cf0a0-1922-401b-a1ae-6ec9261484c0" SEC_TYPE="ext2" TYPE="ext3"
you can check this link for more info
In /dev/disk/by-uuid
there are symlinks mapping each drive's UUID to its entry in /dev
(e.g. /dev/sda1
)
The best command to use is
lsblk -f
.
It will list all the devices and partitions, how they are mounted (if at all) and the tree structure of the devices in the case of using LVM, crypto_LUKS, or multiple volume groups on the same drive.