Categories: TutorialsUbuntu

lsblk Command in Linux

Introduction

The lsblk command in Linux allows the user to see details of block devices and these block devices (except ram disks) are files corresponding to devices connected to the computer. To get the information it displays it will query /sys virtual filesystem and udev db.

Its output will be displayed like a tree structure. Now we’re gonna introduce you to using the lsblk command in Linux. Hope you understand.

Installing lsblk command

Run apt command to install:

$ sudo apt install util-linux

Output:

Using
Sponsored
lsblk command

1. Display block devices

$ lsblk

Output:

2. Display empty block devices

$ lsblk -a

Output:

3. Display size information in bytes

$ lsblk -b

Output:

4. Display zone model for devices

Sponsored
$ lsblk -z

Output:

5. Skip slave entries

$ lsblk -d

Output:

6. Display owner, group, mode

$ lsblk -m

Output:

7. Display help information

$ lsblk --help

Output:

Conclusion

We just introduced you to how to use the lsblk command in Linux.

Thank you for reading!

Ubuntu Server Admin

Recent Posts

AMI and Canonical announce partnership

The collaboration makes it easy to boot directly into Ubuntu from AMI’s UEFI firmware solutions…

3 days ago

The $8.8 trillion advantage: how open source software reduces IT costs

Open source software is known for its ability to lower IT costs. But in 2025,…

3 days ago

Open design: the opportunity design students didn’t know they were missing

What if you could work on real-world projects, shape cutting-edge technology, collaborate with developers across…

6 days ago

Anbox Cloud 1.28.0 is now available!

Enhanced Android device simulation, smarter diagnostics, and OIDC-enforced authentication The Anbox Cloud team has been…

6 days ago

83% of organizations see value in adopting open source, but report major gaps in security and governance

A new Linux Foundation report reveals how organizations worldwide are adopting, using, and perceiving open…

7 days ago