Disks and file system

Command blkid

Show UUID and file system types

Linux · Bash examples · commands run on the selected server

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

-o FORMAT
Select a format, for example list or export.
-s TAG
Show a specific attribute, for example UUID.
-p
Perform low-level probing of the device.

Usage examples

Show known file systems

blkid

Detected 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/vda1

Only the selected partition's filesystem UUID is printed.

View properties in export format

sudo blkid -o export /dev/vda1

Metadata 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.