List all disks and partitions with lsblk

Display every block device as a tree — disks, partitions, sizes, filesystems, UUIDs, and where each is mounted.

LinuxFilessystemDiagnosticsLow risk
Run lsblk -f to get a tree of all block devices including their filesystem type, UUID, and mount point.

01Command

Command
$ lsblk -f

02What it does

lsblk reads sysfs and shows devices as a tree: whole disks like sda or nvme0n1 at the top with partitions like sda1 indented beneath. The -f flag adds filesystem type, label, UUID, and mount point — the UUID is what you put in /etc/fstab. Use plain lsblk for a compact view, lsblk -o NAME,SIZE,TYPE,MOUNTPOINT to pick columns, and -a to include empty loop/ram devices. Running it before any mkfs, mount, or dd command is the standard way to confirm you are targeting the right device.

03Risk

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • lsblk(8) — list block devices
    man7.org · technical · 2026-09-17
    Evidence: The lsblk man page documents '-f' / '--fs' as outputting info about filesystems, including FSTYPE, LABEL, UUID, and mount points.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions