• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

lsblk Command Examples in Linux

by Deepika

The lsblk command displays information about all block storage devices that are currently available on the system. The output is displayed in a tree-like format with each physical device at the top of the tree and each partition or logical volume branching off from that device. The information displayed includes names, major and minor numbers, size, device type, and mount point.

Syntax

The syntax of the lsblk command is:

# lsblk [options] [device name] lsblk COMMAND OPTIONS

The following table lists some of the options available with the lsblk command.

Option Description
-a List empty devices as well.
-e {device list} Exclude devices from output that you provide as a list of comma-separated major device numbers.
-f Output additional file system information.
-l Output results in list format.
-m Output permissions information for devices.

Here is an example of lsblk command output without any arguments passed to it.

lsblk command output

lsblk Command Examples

1. List all storage devices in a tree-like format:

# lsblk

2. Also list empty devices:

# lsblk -a

3. Print the SIZE column in bytes rather than in a human-readable format:

# lsblk -b

4. Output info about filesystems:

# lsblk -f

5. Use ASCII characters for tree formatting:

# lsblk -i

6. Output info about block-device topology:

# lsblk -t

7. Exclude the devices specified by the comma-separated list of major device numbers:

# lsblk -e 1,7

8. Display a customized summary using a comma-separated list of columns:

# lsblk --output NAME,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT

Filed Under: Linux

Some more articles you might also be interested in …

  1. Linux / UNIX : How to send mails with attachments using mailx command
  2. jhipster Command Examples
  3. chafa: Image printing in the terminal
  4. git describe: Give an object a human-readable name based on an available ref
  5. kcat Command Examples
  6. watch command examples to run a command repeatedly or monitor dynamically changeable files (like /proc/*)
  7. rusnapshot: command not found in Linux
  8. pvck Command Examples in Linux
  9. balooctl Command Examples in Linux
  10. How To Increase The Retention Of “sar” Data To ‘N’ Days in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright