lsblk — block devices
A tree of disks, partitions, and logical volumes — size, filesystem, mountpoint.
Cheat sheet
6 commands Printable version-
lsblktree: disks → partitions → LVM/RAID -
lsblk -f+ filesystem, UUID, mountpoint -
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTcustom columns -
lsblk -ddisks only, no partitions -
lsblk -p /dev/sdbone device, full path -
lsblk -e 7skip loop devices (major 7)
Overview
lsblk reads the block device tree from /sys/block — no root needed, and it
never touches the disks themselves. It shows disks, partitions, LVM volumes,
and RAID arrays as a single hierarchy: what is built on top of what.
It's an overview of devices, not of used space (for that, see
disk-usage) and not a list of active mounts (for that, findmnt or
mount).
Options
6Below are the main flags; the full list is in man lsblk.
| Option | What it does | Example |
|---|---|---|
-f --fs |
Add filesystem type, UUID, label, and mountpoint columns. | lsblk -f |
-o LIST |
Custom columns instead of the default set (comma-separated). | lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT |
-d --nodeps |
Devices only, without partitions and child devices. | lsblk -d |
-p --paths |
Full device path (/dev/sda1) instead of the bare name. | lsblk -p |
-e --exclude LIST |
Exclude device types by major number (7 is loop devices). | lsblk -e 7 |
-a --all |
Also show empty devices (no partition or filesystem). | lsblk -a |
Nothing found. Try a shorter query.
Recipes
3Mountpoints and UUIDs for fstab
Custom columns for scripts
Troubleshooting
3Plugged in a disk, but lsblk doesn't show it
lsblk doesn't rescan the bus — the kernel has to see the device first. Check
dmesg | tail (see kernel-modules) or rescan the SCSI host:
echo "- - -" | sudo tee /sys/class/scsi_host/host*/scan.
The device is in lsblk, but not mounted
lsblk -f with an empty MOUNTPOINT column — the partition exists but isn't
mounted and/or isn't in /etc/fstab. Next step: mount.
Device names shift between reboots
/dev/sdX can change when disks are reordered. Use the UUID in fstab and
scripts (lsblk -f or blkid), not the bare device name.
See also
- fdisk-parted — partition the new disk lsblk found.
- blkid — filesystem UUID and label as a separate command.
- loop-device — where the loopN devices in the list come from.
- mount — Mounting and fstab — mountpoints, UUIDs, bind mounts and tmpfs.
- disk-usage — Where did the space and inodes go — df, du, finding large files.
- lvm — PV → VG → LV; flexible disk management, extending and snapshots.
Found an inaccuracy? Report an error in the article