Probe block devices to reveal UUIDs, labels and filesystem types so you can reference disks reliably. 23.02.2026 | reading time: 2 min On a machine with many disks, how do you find a partition's UUID, label and type quickly and reliably? Use blkid to probe block devices and print identifying attributes so you can reference them in scripts and in /etc/fstab. Quick probe Run `blkid` to list devices and their attributes; for example: ```$ blkid /dev/sda1: UUID=\"E7B1-2A3B\" TYPE=\"vfat\" PARTLABEL=\"EFI system partition\" PARTUUID=\"11111111-01\" /dev/sda2: UUID=\"9f7c3a5e-...\" TYPE=\"ext4\" PARTUUID=\"11111111-02\" /dev/sdb1: LABEL=\"DATA\" UUID=\"1111-2222\" TYPE=\"ntfs\" $ blkid -o value -s UUID /dev/sda2 9f7c3a5e-... $ blkid -o export /dev/sdb1 LABEL=DATA UUID=1111-2222 TYPE=ntfs ``` Scripted lookups When you write mount or provisioning scripts, call `blkid -o value -s UUID` to retrieve a UUID for a device and feed that into `mount` or `fstab`; this removes fragile /dev/sdX dependencies and makes boots and automation predictable. Options that matter Use `-s` to select a tag like UUID or TYPE, `-o` for output formats such as value or export, `-p` to force probing when needed and `-c` to control the cache file (for example `-c /dev/null` disables the cache); combine these in scripts to extract exactly the field you need. Complementary commands Combine `blkid` with `lsblk` to get a tree view of devices, with `udevadm` for udev metadata and with `findfs` or `mount` when you need to resolve and attach filesystems by UUID or LABEL during boot or recovery. Next steps Try replacing device paths with UUIDs in a test system's /etc/fstab and use `blkid -o value -s UUID` in a small script to prove it works; then explore deeper disk and filesystem tools and consider formal study at bitsandbytes.academy to prepare for certifications like CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage boot-process troubleshooting