lsscsi

lists SCSI devices and their attributes

TLDR

List all SCSI devices
$ lsscsi
Show disk capacities
$ lsscsi -s
Show detailed attributes
$ lsscsi -L
Show transport information (SAS, SATA, USB, etc.)
$ lsscsi -t
List SCSI hosts
$ lsscsi -H
Show generic device names (sg*)
$ lsscsi -g

SYNOPSIS

lsscsi [OPTIONS]

DESCRIPTION

lsscsi lists SCSI devices (including SATA disks through libata) and their attributes. It provides information about device type, vendor, model, and device node paths.

PARAMETERS

-L, --list

List attributes in key=value format
-s, --size
Show disk capacity in human-readable format
-g, --generic
Show generic SCSI device name (sg*)
-H, --hosts
List SCSI hosts instead of devices
-l, --long
Output additional information
-c, --classic
Classic output format (similar to lsscsi 0.21)
-d, --device
Show device major and minor numbers
-t, --transport
Show transport information

INSTALL

sudo apt install lsscsi
sudo dnf install lsscsi
sudo pacman -S lsscsi
sudo apk add lsscsi
sudo zypper install lsscsi
nix profile install nixpkgs#lsscsi

CAVEATS

Shows devices through the Linux SCSI subsystem, which includes SATA, SAS, USB mass storage, and other devices. Some virtual or emulated devices may not appear.

HISTORY

lsscsi provides a human-readable view of the kernel's SCSI device information from sysfs.

SEE ALSO

lsblk(8), lspci(8), lsusb(8)