blkid
Linux · System · reference only
What it does
Shows the UUID, label and file system type of block devices, such as disks and partitions.
Syntax
blkid [opciones] [dispositivo...]
Options and parameters
-s etiquetaShows only that property, such as UUID, LABEL or TYPE.
-o formatoChanges the output format: value, device, full, list or export.
-L etiquetaLooks for the device that has that label.
-U uuidLooks for the device that has that UUID.
-pProbes the device directly instead of using the cache.
Usage examples
sudo blkidLists all devices with their UUID and type.
sudo blkid /dev/sda1Shows the data of one specific partition.
sudo blkid -s UUID -o value /dev/sda1Prints only the UUID, ready to copy into /etc/fstab.
sudo blkid -L datosFinds the device whose label is datos.
Notes and common mistakes
- It is commonly used to identify partitions by UUID in /etc/fstab, which does not change even if the device name does.