Back to the command reference

lsblk

DisksBeginner In real Linux

List block devices (disks and partitions)

Name: lsblk = list block devices

This command needs a real Linux system; you can practise it in real Linux mode.

Full man page

Description

lsblk lists block devices (disks, partitions, LVM volumes) as a tree with size, type and mount point; -f adds file system type and UUID. Check device names with it before partitioning or formatting.

Syntax

lsblk [OPTION]...

Common options

-f / --fsShow file system type and UUID
-o / --output LISTColumns, e.g. NAME,SIZE,MOUNTPOINT
-a / --allShow empty devices too
-d / --nodepsDisks only, not partitions
-p / --pathsFull device paths (/dev/sda1)
-b / --bytesSizes in bytes
-J / --jsonOutput JSON

Examples

  • $ lsblk

    Every disk, partition and mount point

    Explain
  • $ lsblk -f

    Including file system types

    Explain

Related