findfs

locate filesystems by label or UUID

TLDR

Find device by filesystem label
$ findfs LABEL=[label]
Find device by filesystem UUID
$ findfs UUID=[uuid]
Find device by GPT partition label
$ findfs PARTLABEL=[partition_label]
Find device by GPT partition UUID
$ findfs PARTUUID=[partition_uuid]

SYNOPSIS

findfs tag=value

DESCRIPTION

findfs finds a filesystem by label or UUID and prints the device path. It searches all block devices for matching filesystem metadata.Used in boot scripts and mount operations to locate filesystems reliably.

PARAMETERS

LABEL=label

Search by filesystem label
UUID=uuid
Search by filesystem UUID
PARTLABEL=label
Search by GPT/MAC partition label
PARTUUID=uuid
Search by GPT partition UUID

INSTALL

sudo apt install util-linux
sudo dnf install util-linux
sudo pacman -S util-linux
sudo apk add util-linux-misc
sudo zypper install util-linux
brew install util-linux
nix profile install nixpkgs#util-linux

CAVEATS

Part of util-linux. PARTUUID only available on GPT partition tables. Labels and UUIDs must be unique for reliable matching.

SEE ALSO

blkid(8), lsblk(8), fstab(5)