lsblk(1)
List all block devices and their mount points in a tree or list format.
Synopsis
lsblk [OPTION]... [DEVICE]...Description
lsblk lists information about all available block devices or the specified devices. It reads the sysfs filesystem and udev db to gather device details, presenting them in a tree structure by default to show device relationships and hierarchies.
Block devices include hard drives, SSDs, USB drives, loop devices, and RAID arrays. The output shows device names, sizes, types, mount points, and other properties useful for disk and partition management.
Common options
| Flag | What it does |
|---|---|
-a | Include all devices, even empty ones and RAM disks |
-d | Print only the major and minor device numbers |
-f | Show filesystem information (FSTYPE and LABEL columns) |
-l | Use list format instead of tree format |
-m | Print info about device owners and permissions |
-n | Do not print headings; use with -l for easy parsing |
-o COLUMNS | Specify which columns to display (e.g., NAME,SIZE,TYPE,MOUNTPOINT) |
-p | Print device names in full /dev/xxx format |
-t NAME | Show only devices of specified type (e.g., disk, loop, lvm2lv) |
-x | Print all available columns |
Examples
Show all block devices in tree format with default columns (NAME, MAJ:MIN, RM, SIZE, RO, TYPE, MOUNTPOINT)
lsblkList all block devices in simple list format instead of tree
lsblk -lShow filesystem types and labels for each device
lsblk -fDisplay only NAME, SIZE, FSTYPE, and MOUNTPOINT columns for /dev/sda and its partitions
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT /dev/sdaList all disk devices (not partitions) without headers in list format
lsblk -ln | grep diskShow only physical disks, excluding partitions and virtual devices
lsblk -t diskDisplay all devices with every available column of information
lsblk -a -xShow details about a specific NVMe drive and its partitions
lsblk /dev/nvme0n1