• 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 not found

by Deepika

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

If you encounter the below error while running the command lsscsi:

lsscsi: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install lsscsi
Ubuntu apt-get install lsscsi
Alpine apk add lsscsi
Arch Linux pacman -S lsscsi
Kali Linux apt-get install lsscsi
CentOS yum install lsscsi
Fedora dnf install lsscsi
Raspbian apt-get install 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. CentOS / RHEL : How to create a Thinly Provisioned Logical Volume
  2. gnome-software: command not found
  3. CentOS / RHEL 7 : How to install kernel from rescue mode
  4. aspell Command Examples in Linux
  5. pamac Command Examples in Linux
  6. Manage ASM Audit Files with syslog – configure lograte and auditing
  7. ORA-01031: insufficient privileges when creating a materialized view
  8. firejail: command not found
  9. How to Create and Manage Storage Domains in RedHat Virtualization (RHV)
  10. legit Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • csslint: A linter for CSS code
  • csh: The shell (command interpreter) with C-like syntax (Command Examples)
  • csc: The Microsoft C# Compiler (Command Examples)
  • crystal: Tool for managing Crystal source code

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright