lsblk

List block devices in a tree view showing partitions and mount points.

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

lsblk displays block devices (disks, partitions, LVM, NVMe) in a tree structure with sizes, types, and mount points. Far clearer than parsing fdisk or df output for understanding disk layout. The -f flag adds filesystem and UUID info.

Common flags
FlagMeaning
-f --fsShow filesystem type, UUID, and label
-d --nodepsDon't show device dependencies (list disks only)
-J --jsonJSON output
-o --outputSelect specific columns
Examples
lsblkTree view of all block devices · explain & risk-check →
lsblk -fInclude filesystem type, UUID, and mount points · explain & risk-check →
lsblk -d -o NAME,SIZE,ROTA,TYPEList disks with rotation (HDD vs SSD) · explain & risk-check →
lsblk -J | jq '.blockdevices[] | {name:.name, size:.size}'JSON output for scripting · explain & risk-check →
Pro tip

Check `ROTA` column in `lsblk -d -o NAME,SIZE,ROTA` — ROTA=1 means HDD (spinning), ROTA=0 means SSD/NVMe. Critical for setting correct I/O scheduler and benchmark expectations.

Related
mount df fdisk
Open the full explainer →More in Disks & Filesystems

Reference text is hand-written and may be incomplete — check man lsblk for your version. Test destructive commands on a non-production system first.