• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

lsscsi Command Examples in Linux

by admin

To list the SCSI devices on your system, use a utility that walks the device paths provided by sysfs. One of the most succinct tools is lsscsi. Here’s what you can expect when you run it:

$ lsscsi
[0:0:0:0]    disk    ATA     WDC WD3200AAJS-2  01.0  /dev/sda
[2:0:0:0]    disk    FLASH   Drive UT_USB20    0.00  /dev/sdb

The first column identifies the address of the device on the system, the second describes what kind of device it is, and the last indicates where to find the device file. Everything else is vendor information.

Use yum -y install lsscsi to install the lsscsi package, and enter lsscsi to verify that installation was successful:

# yum -y install lsscsi
# lsscsi

lsscsi Command Examples

1. To list SCSi devices:

# lsscsi

2. To get the classic output:

# lsscsi -c
# lsscsi --classic

3. To get the device name the device node major and minor numbers:

# lsscsi -d
# lsscsi --device

4. To output the scsi generic device file name:

# lsscsi -g
# lsscsi --generic

5. To get the help:

# lsscsi -h
# lsscsi --help

6. To list the SCSI hosts currently attached to the system.

# lsscsi -H
# lsscsi --hosts

7. To Use linux default algorithm for naming devices:

# lsscsi -k
# lsscsi --kname

8. To output additional information in pairs:

# lscsci -L
# lscsci --list

9. To output additional information for each SCSI device:

# lsscsi -l
# lsscsi --long

10. To output additional data integrity (protection) information:

# lsscsi -p
# lsscsi --protection

11. To output transport information:

# lsscsi -t
# lsscsi --transport

12. To get the verbose info:

# lsscsi -v
# lsscsi --verbose

13. To get the version:

# lsscsi -V
# lsscsi --version

14. To assumes sysfs is mounted at PATH instead of the default /sys:

# lsscsi -y
# lsscsi --sysfsroot=PATH

Filed Under: Linux

Some more articles you might also be interested in …

  1. goaccess Command Examples in Linux
  2. bsdtar command – Read and write tape archive files
  3. pacaur Command Examples in Linux
  4. How to disable swap in Linux
  5. lnstat Command Examples in Linux
  6. How to take mailbox backup of Zimbra Account from CLI
  7. How to uninstall neovim from Ubuntu
  8. lvscan Command Examples in Linux
  9. CentOS / RHEL : How to backup/restore configuration using authconfig
  10. CentOS / RHEL 7 : How to create custom script to run automatically during boot

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright