Disk

blkid

Locate and print block device attributes including UUID and filesystem type.

Synopsis

syntax
blkid [OPTION]... [DEVICE]...

Examples

Show all block device attributes
sudo blkid
Show attributes of specific partition
blkid /dev/sda1
Get only UUID of a partition
blkid -s UUID -o value /dev/sda1
Find device with label 'mydata'
blkid -L mydata

Common options

FlagDescription
-oOutput format (value, full, list)
-sShow only specified tag
-pLow-level probing mode
-LFind device by label

About blkid

The `blkid` command locate and print block device attributes including UUID and filesystem type. Disk commands handle low-level storage operations including partitioning, formatting, filesystem checks, and block device management.

These tools are critical during system installation, storage expansion, data recovery, and performance tuning. Always exercise caution — disk operations can cause data loss if used incorrectly.

The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man blkid`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Disk Commands

Other commands in the Disk category

Related tools