Forrest logo
back to the lsblk tool

lsblk:tldr:8aa2d

lsblk: Print the SIZE column in bytes rather than in a human-readable format.
$ lsblk -b
try on your machine

The command "lsblk -b" is used to list block devices and their attributes in the system, displaying the information in bytes.

Here's a breakdown of the command:

  • "lsblk": This is the command itself, which stands for list block devices. It is used to retrieve information about block devices (such as hard drives, solid-state drives, USB drives) connected to the system.

  • "-b": This is an option or flag for the "lsblk" command. The "-b" option specifies the output format to be displayed in bytes. By default, lsblk shows the sizes in human-readable format (e.g., KB, MB, GB), but with the "-b" option, it displays the sizes in bytes.

By running "lsblk -b", you will get a detailed list of block devices connected to your system, along with their sizes and other relevant information, expressed in bytes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lsblk tool