Forrest logo
back to the lsscsi tool

lsscsi:tldr:2a189

lsscsi: List all SCSI devices.
$ lsscsi
try on your machine

The lsscsi command is a Linux command that lists information about SCSI (Small Computer System Interface) devices connected to the system. SCSI is a standardized interface used for connecting various storage devices to a computer, such as hard drives, optical drives, and tape drives.

When you execute lsscsi, it retrieves information directly from the Linux kernel and provides an organized list of SCSI devices and their details, including the device name, type, bus, target ID, and associated storage size.

The output of the lsscsi command typically looks something like this:

[0:0:0:0]    disk    ATA      QEMU HARDDISK    2.5+   /dev/sda
[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+   /dev/sr0

Let's break down the meaning of each column:

  • [0:0:0:0]: Represents the SCSI address of the device. Each colon-separated digit represents the SCSI bus, target ID, logical unit number, and shared storage area, respectively.
  • disk or cd/dvd: Indicates the device type, such as a disk (hard drive) or a CD/DVD drive.
  • ATA or QEMU: Specifies the device vendor or model name.
  • QEMU HARDDISK or QEMU DVD-ROM: Provides additional information about the device model.
  • 2.5+: Shows the Linux kernel version and SCSI midlevel interface version.
  • /dev/sda or /dev/sr0: Represents the corresponding device file or block special file associated with the SCSI device.

By executing lsscsi, administrators can quickly identify all connected SCSI devices, verify their availability, and gather information that may be helpful for troubleshooting or system monitoring purposes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lsscsi tool