Read Device UUIDs With blkid
Print UUID, label, type and PARTUUID for block devices.
01Command
$ blkid /dev/sda102What it does
Mounting by UUID instead of device node survives disk reordering, and blkid is how you obtain those identifiers for fstab or scripts. It is a small, reliable query that is much easier to automate than reading partition dialogs.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- blkid.8.en.html manual page (Debian bookworm)Evidence: Documents blkid, which prints UUID, LABEL and TYPE for block devices.
Last verified: 2026-10-13 · Category: System & Settings
06Related solutions
Show total, used, and available space plus usage percentage for every mounted filesystem in human-readable units.
Measure the size of each immediate subdirectory and sort them smallest to largest so the biggest offenders land at the bottom.
Display every block device as a tree — disks, partitions, sizes, filesystems, UUIDs, and where each is mounted.