lsblk — List Block Devices as a Tree

Practical guide to lsblk — show disks, partitions and mount points as a readable tree and pick the right device before running dd, fdisk or mount.

lsblk lists every block device on your system – hard disks, SSDs, partitions, loop devices and USB sticks – as a readable tree with name, size, type and mount point. It reads its information straight from the kernel (sysfs/udev) and is a pure read-only command: it changes nothing and is safe to run as often as you like. That makes lsblk the ideal sanity check before you operate on a device with dd, fdisk or mount – you confirm exactly which /dev/… you are dealing with and avoid grabbing the wrong disk by accident.

Basic Usage

lsblk — List all block devices in tree format.

lsblk

lsblk -a — Show all devices including empty ones.

lsblk -a

lsblk <device> — Show info for a specific device.

lsblk /dev/sda

lsblk -l — List format (flat, no tree).

lsblk -l

Output Columns

lsblk -f — Show filesystem type, label, UUID, and mount point.

lsblk -f

lsblk -o <columns> — Show specific columns.

lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,UUID

lsblk -o NAME,SIZE,TYPE,TRAN,MODEL — Show device model and transport type.

lsblk -o NAME,SIZE,TYPE,TRAN,MODEL

lsblk -O — Show all available columns.

lsblk -O

lsblk --help — Show help, including the list of all available column names.

lsblk --help

Output Formats

lsblk -J — Output in JSON format.

lsblk -J

lsblk -P — Output in key=value pairs format.

lsblk -P

lsblk -r — Raw output (for scripting).

lsblk -r -o NAME,SIZE,MOUNTPOINT

lsblk -b — Show sizes in bytes instead of human-readable.

lsblk -b

Filtering

lsblk -d — Show only whole disks (no partitions).

lsblk -d

lsblk -n — Suppress the header line.

lsblk -n -o NAME,SIZE

lsblk -e <major> — Exclude devices by major number (7=loop).

lsblk -e 7

lsblk -I <major> — Include only devices with a specific major number (8=SCSI/SATA).

lsblk -I 8

Common Patterns

lsblk -d -o NAME,SIZE,MODEL,TRAN — List physical disks with model and interface type.

lsblk -d -o NAME,SIZE,MODEL,TRAN

lsblk -f -o NAME,FSTYPE,SIZE,MOUNTPOINT,FSUSE% — Show filesystem usage per partition.

lsblk -f -o NAME,FSTYPE,SIZE,MOUNTPOINT,FSUSE%

lsblk -o NAME,UUID -n -l | grep -v '^$' — List all partition UUIDs (for fstab).

lsblk -o NAME,UUID -n -l | grep -v '^$'

lsblk -S — Show SCSI/SATA device information.

lsblk -S

Conclusion

lsblk is one of those commands worth picking up early: a single call gives you a clear overview of every disk, its partitions and where they are mounted. Day to day you mostly need plain lsblk for the tree and lsblk -f to see filesystems, labels and UUIDs; with -o and -J you tailor the output for reports or scripts. Its biggest value is as a safe sanity check: always confirm with lsblk which /dev/… device you are looking at before you touch it with dd, fdisk or mount. lsblk itself writes nothing and does no harm – the danger only arises when you hand the wrong device to a destructive command.

Further Reading

  • fdisk – view and edit disk partition tables
  • mount – attach filesystems to the directory tree
  • df-du – check used and free disk space