lsblk:tldr:9d3de
The lsblk
command is used to list information about all available block devices (such as hard drives, solid-state drives, and removable storage devices) connected to your system. It displays detailed information about each block device, including the device name, size, type, mount point (if applicable), and other relevant details.
By default, when you run the lsblk
command without any options or arguments, it will produce a tabular output showing key information about the block devices in a hierarchical tree-like structure. The output will typically include the device name, major and minor numbers, disk type, size, partition layout (if any), and mount points.
For example, the output might look like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 2G 0 part [SWAP]
└─sda3 8:3 0 235.1G 0 part /
This output indicates that the system has a block device named sda
with a size of 238.5GB. It is divided into three partitions (sda1
, sda2
, and sda3
), with the last partition (sda3
) being mounted at the root (/
) directory. The other partitions also have specific mount points (/boot/efi
and [SWAP]
).
The lsblk
command provides a convenient way to get an overview of the block devices on your system and their associated information, which can be helpful for troubleshooting, disk management, or general system exploration.