Copied to clipboard

lsblk

`lsblk` command is used to list information about block devices, such as the size of disks and disk partitions and their mount points.

Examples

  • List information about all block devices: lsblk
  • List information about all block devices, including empty devices: lsblk -a
  • List information about all block devices, including size and mount points: lsblk -f
  • Print the topological structure of devices: lsblk -d
  • Print device relationships: lsblk -m
  • Print device UUID: lsblk -u
  • Print the size of devices in bytes: lsblk -b
  • Print file system type: lsblk -t
  • Print MAJOR and MINOR information for devices: lsblk -p
  • Print device ID number: lsblk -i
  • Print device ID number, but not for disks and partitions: lsblk -I
  • Print read-only attributes for devices: lsblk -r
  • Print hierarchy: lsblk -l
  • Print mount points for devices: lsblk -n
  • Do not print device VENDOR information: lsblk -y
  • Do not print device SIZE information: lsblk -z
  • Do not print any information other than device size: lsblk -S
  • Filter device path: lsblk -e
  • Output information in the specified format: lsblk -o