lsblk

Lists information about devices. More information: <https://manned.org/lsblk>.

Install

All systems
curl cmd.cat/lsblk.sh
Debian Debian
apt-get install util-linux
Ubuntu
apt-get install util-linux
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install util-linux
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install util-linux
OS X
brew install util-linux
Raspbian
apt-get install util-linux
Docker
docker run cmd.cat/lsblk lsblk powered by Commando

Lists information about devices. More information: <https://manned.org/lsblk>.

  • List all storage devices in a tree-like format:
    lsblk
  • Also list empty devices:
    lsblk -a
  • Print the SIZE column in bytes rather than in a human-readable format:
    lsblk -b
  • Output info about filesystems:
    lsblk -f
  • Use ASCII characters for tree formatting:
    lsblk -i
  • Output info about block-device topology:
    lsblk -t
  • Exclude the devices specified by the comma-separated list of major device numbers:
    lsblk -e 1,7
  • Display a customized summary using a comma-separated list of columns:
    lsblk --output NAME,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT

© tl;dr; authors and contributors