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.
Run apt command to install:
$ sudo apt install util-linux
Output:
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
$ 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:
We just introduced you to how to use the lsblk command in Linux.
Thank you for reading!
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.
This article provides a guide to configure OpenLiteSpeed as a reverse proxy for Metabase. What…
The collaboration makes it easy to boot directly into Ubuntu from AMI’s UEFI firmware solutions…
Open source software is known for its ability to lower IT costs. But in 2025,…
What if you could work on real-world projects, shape cutting-edge technology, collaborate with developers across…
Enhanced Android device simulation, smarter diagnostics, and OIDC-enforced authentication The Anbox Cloud team has been…
A new Linux Foundation report reveals how organizations worldwide are adopting, using, and perceiving open…