$linuxjunkies
>

lsblk(1)

List all block devices and their mount points in a tree or list format.

UbuntuDebianFedoraArch

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

FlagWhat it does
-aInclude all devices, even empty ones and RAM disks
-dPrint only the major and minor device numbers
-fShow filesystem information (FSTYPE and LABEL columns)
-lUse list format instead of tree format
-mPrint info about device owners and permissions
-nDo not print headings; use with -l for easy parsing
-o COLUMNSSpecify which columns to display (e.g., NAME,SIZE,TYPE,MOUNTPOINT)
-pPrint device names in full /dev/xxx format
-t NAMEShow only devices of specified type (e.g., disk, loop, lvm2lv)
-xPrint all available columns

Examples

Show all block devices in tree format with default columns (NAME, MAJ:MIN, RM, SIZE, RO, TYPE, MOUNTPOINT)

lsblk

List all block devices in simple list format instead of tree

lsblk -l

Show filesystem types and labels for each device

lsblk -f

Display only NAME, SIZE, FSTYPE, and MOUNTPOINT columns for /dev/sda and its partitions

lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT /dev/sda

List all disk devices (not partitions) without headers in list format

lsblk -ln | grep disk

Show only physical disks, excluding partitions and virtual devices

lsblk -t disk

Display all devices with every available column of information

lsblk -a -x

Show details about a specific NVMe drive and its partitions

lsblk /dev/nvme0n1

Related commands