When to use blkid
Use blkid to identify filesystem types and persistent identifiers before configuring mounts. A device name can change between boots, while filesystem UUIDs are useful for stable configuration when verified against the intended volume.
Syntax
blkid [PARAMETERS] [DEVICE...]Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
Show known file systems
blkidDetected block-device metadata is displayed, subject to access and cache behaviour.
View UUID system partition using a known path
sudo blkid -s UUID -o value /dev/vda1Only the selected partition's filesystem UUID is printed.
View properties in export format
sudo blkid -o export /dev/vda1Metadata is shown in an export-friendly key-value form.
Notes and limitations
- The device names in the examples are conditional: first define yours using lsblk.
- Without privileges, the output may rely on the cache and not reflect the actual state.
Common questions and troubleshooting
Why does blkid show no information?
The device may be inaccessible, unformatted or contain an unrecognized signature. Inspect the actual device layout before assuming it has no data.
Is a device path from an example safe to reuse?
No. Confirm your own disk and partition identifiers using read-only inspection. Device names in examples are placeholders, not a selection of your data disk.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man blkid.