24.4. Viewing Block Devices and File Systems
24.4.1. Using the lsblk Command Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
The
lsblk
command allows you to display a list of available block devices. To do so, type the following at a shell prompt:
lsblk
lsblk
For each listed block device, the
lsblk
command displays the device name (NAME
), major and minor device number (MAJ:MIN
), if the device is removable (RM
), what is its size (SIZE
), if the device is read-only (RO
), what type is it (TYPE
), and where the device is mounted (MOUNTPOINT
). For example:
By default,
lsblk
lists block devices in a tree-like format. To display the information as an ordinary list, add the -l
command-line option:
lsblk -l
lsblk -l
For instance:
For a complete list of available command-line options, see the lsblk(8) manual page.