The lsscsi command can be used to list all SCSI / SATA hard disks and CD / DVD drives on a Linux system. Here’s how to use it:
- Open a terminal on your Linux system.
- Type the following command and press Enter:
lsscsi
This will display a list of all SCSI / SATA devices on your system, including hard disks and CD / DVD drives.
The output will be in the following format:
[HOST]:[CHANNEL]:[ID]:[LUN] [TYPE] [VENDOR]:[MODEL] [REVISION]
Here’s what each field means:
HOST: The SCSI host number.CHANNEL: The SCSI channel number.ID: The SCSI ID of the device.LUN: The Logical Unit Number of the device.TYPE: The device type, such as disk, tape, CD/DVD, or optical.VENDOR: The vendor of the device.MODEL: The model of the device.REVISION: The firmware revision of the device.
For example, the following output shows two hard disks (
sdaandsdb) and a CD/DVD drive (sr0):[] disk ATA WDC WD2500JS-22N 03.0
[] disk ATA WDC WD10EZEX-08M 01.0
[] cd/dvd TSSTcorp CDDVDW SH-S223C SB03
The first field (
[0:0:0:0],[1:0:0:0], etc.) identifies the device’s location on the SCSI bus. The second field (diskorcd/dvd) indicates the device type, and the third field (ATAorTSSTcorp) is the vendor.Note that you need to have SCSI/SATA hardware and the
lsscsiutility installed to use this command.