Quick take: The lsblk command lists block devices — disks and their partitions — in a tree. Plain lsblk shows sizes and mount points; lsblk -f adds filesystem types, labels, and UUIDs, which you need before mounting.
Introduction
The lsblk command lists the system's block devices — hard drives, SSDs, USB sticks, and their partitions — in an easy-to-read tree. It is the first command to run when adding storage, identifying a USB device, or finding the UUID needed for /etc/fstab.
This guide covers reading the device tree, showing filesystem details, and using lsblk to prepare disks for mounting.
Syntax
The basic syntax of the lsblk command is:
lsblk [OPTIONS] [DEVICE]Common Options and Parameters
The most useful options and parameters for the lsblk command:
| Option | Description |
|---|---|
| -f | Show filesystem type, label, UUID, and mount point. |
| -a | Also list empty devices. |
| -p | Show full device paths (/dev/sda instead of sda). |
| -o COLS | Choose which columns to display. |
| -m | Show permissions and ownership of devices. |
| -S | List only SCSI/SATA disks. |
| -d | List devices only, without their partitions. |
Practical Examples
Real lsblk commands you can run today:
# List all block devices
lsblk
# Show filesystems, labels, and UUIDs
lsblk -f
# Show full device paths
lsblk -p
# Pick specific columns
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT
# Inspect one disk
lsblk /dev/sda
# List whole disks only
lsblk -dTips and Best Practices
lsblk -fis the command to run before mounting — it shows the filesystem type and UUID you need.- Use lsblk to confirm you have the right device before formatting or partitioning, so you do not wipe the wrong disk.
- The TYPE column distinguishes
disk,part(partition),lvm, androm, making the layout clear at a glance.
Final Thoughts
lsblk gives the clearest picture of a system's storage — disks, partitions, sizes, filesystems, and mount points in one tree. Reach for lsblk -f whenever you need a UUID or filesystem type before mounting, and use it to confirm device names before any destructive operation. It pairs naturally with mount, df, and fdisk.
FAQ: lsblk Command in Linux
How do I list disks and partitions in Linux?+
Run lsblk to see all block devices in a tree showing names, sizes, and mount points. Add -f to include filesystem types and UUIDs.
How do I find a partition's UUID?+
Use lsblk -f, which lists the UUID alongside each filesystem, or run blkid. The UUID is what you reference in /etc/fstab for stable mounting.
What is the difference between lsblk and df?+
lsblk lists all block devices and partitions whether or not they are mounted, focusing on the hardware layout. df shows usage of mounted filesystems only. Use lsblk to see disks and df to see free space.
How do I identify a USB drive I just plugged in?+
Run lsblk before and after plugging it in; the new device (often /dev/sdb or /dev/sdc) is your USB drive. lsblk -f also shows its filesystem and label.
How do I show full device paths with lsblk?+
Use lsblk -p, which prints complete paths like /dev/sda1 instead of just sda1 — handy when copying a device name into another command.
Need help with Linux servers or infrastructure?
Work directly with Muhammad Irfan Aslam for Linux, Ubuntu, Docker, DevOps, cloud, CI/CD, or infrastructure support.
Hire Me for Support