Product SiteDocumentation Site

16.4. Viewing Block Devices and File Systems

16.4.1. Using the lsblk Command

The lsblk command allows you to display a list of available block devices. To do so, type the following at a shell prompt:
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:
~]$ lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0                           11:0    1  1024M  0 rom
vda                          252:0    0    20G  0 disk
|-vda1                       252:1    0   500M  0 part /boot
`-vda2                       252:2    0  19.5G  0 part
  |-vg_fedora-lv_swap (dm-0) 253:0    0   1.5G  0 lvm  [SWAP]
  `-vg_fedora-lv_root (dm-1) 253:1    0    18G  0 lvm  /
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
For instance:
~]$ lsblk -l
NAME                     MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0                       11:0    1  1024M  0 rom
vda                      252:0    0    20G  0 disk
vda1                     252:1    0   500M  0 part /boot
vda2                     252:2    0  19.5G  0 part
vg_fedora-lv_swap (dm-0) 253:0    0   1.5G  0 lvm  [SWAP]
vg_fedora-lv_root (dm-1) 253:1    0    18G  0 lvm  /
For a complete list of available command line options, refer to the lsblk(8) manual page.