Read Device UUIDs With blkid

Print UUID, label, type and PARTUUID for block devices.

LinuxFilesdiskDiagnosticsLow risk
Run blkid /dev/sda1 to print its UUID, filesystem type and label.

01Command

Command
$ blkid /dev/sda1

02What 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

RiskLow risk
Requirementssudo apt install util-linux
!Warning: Running blkid on a disk can wake it and take a moment; on some systems it needs root to read all devices.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-10-13 · Category: System & Settings

06Related solutions