How To Install Lsblk On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Lsblk On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

lsblk

Lists information about devices.

Maintainer: LaMont Jones


Section: utils

Install lsblk

  • Debian apt-get install util-linux Click to copy
  • Ubuntu apt-get install util-linux Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install util-linux Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install util-linux Click to copy
  • macOS brew install util-linux Click to copy

Lists information about devices.

How to use lsblk?

Below are few example commands for lsblk that you can use in the terminal.

List all storage devices in a tree-like format:
lsblkClick to copy
Also list empty devices:
lsblk -aClick to copy
Print the SIZE column in bytes rather than in a human-readable format:
lsblk -bClick to copy
Output info about filesystems:
lsblk -fClick to copy
Use ASCII characters for tree formatting:
lsblk -iClick to copy
Output info about block-device topology:
lsblk -tClick to copy
Installing lsblk command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of lsblk 2026 package in your OS.