OS Manuals

/usr/bin/lsscsi

List SCSI devices (or hosts) and their attributes

From lsscsi 0.33-r2 (enterprise-packages), captured 2026-11-08 by running lsscsi --help (exit 0). permalink

Usage: lsscsi  [--brief] [--classic] [--controllers] [--device] [--generic]
               [--help] [--hosts] [--json[=JO]] [--js-file=JFN] [--kname]
               [--list] [--long] [--long-unit] [--lunhex] [--no-nvme] [--pdt]
               [--protection] [--prot-mode] [--scsi_id] [--size] [--sz-lbs]
               [--sysfsroot=PATH] [--sysroot=AR_PT] [--transport] [--unit]
               [--verbose] [--version] [--wwn]  [<h:c:t:l>]
  where:
    --brief|-b        tuple and device name only
    --classic|-c      alternate output similar to 'cat /proc/scsi/scsi'
    --controllers|-C   synonym for --hosts since NVMe controllers treated
                       like SCSI hosts
    --device|-d       show device node's major + minor numbers
    --generic|-g      show scsi generic device name
    --help|-h         this usage information
    --hosts|-H        lists scsi hosts rather than scsi devices
    --json[=JO]|-j[=JO]    output in JSON instead of plain text. Use
                           --json=? or '-j=?' for JSON help
    --js-file=JFN|-J JFN    JFN is a filename to which JSON output is
                            written (def: stdout); truncates then writes
    --kname|-k        show kernel name instead of device node name
    --list|-L         additional information output one
                      attribute=value per line
    --long|-l         additional information output
    --long-unit|-U    print LU name in full, use twice to prefix with
                      '.naa', 'eui.', 'uuid.' or 't10.'
    --lunhex|-x       show LUN part of tuple as hex number in T10 format;
                      use twice to get full 16 digit hexadecimal LUN
    --no-nvme|-N      exclude NVMe devices from output
    --pdt|-D          show the peripheral device type in hex
    --protection|-p   show target and initiator protection information
    --protmode|-P     show negotiated protection information mode
    --scsi_id|-i      show udev derived /dev/disk/by-id/scsi* entry
    --size|-s         show disk size, (once for decimal (e.g. 3 GB),
                      twice for power of two (e.g. 2.7 GiB),
                      thrice for number of blocks))
    --sysfsroot=PATH|-y PATH    set sysfs mount point to PATH (def: /sys)
    --sysroot=AR_PT|-Y AR_PT    set alternate root path (def: / ). In
                                practice it is the parent directory of
                                PATH. If given lsscsi will access AR_PT/sys
    --sz-lbs|-S       show size as a number of logical blocks; if used twice
                      adds comma followed by logical block size in bytes
    --transport|-t    transport information for target or, if '--hosts'
                      given, for initiator
    --unit|-u         logical unit (LU) name (aka WWN for ATA/SATA)
    --verbose|-v      output path names where data is found
    --version|-V      output version string and exit
    --wwn|-w          output WWN for disks (from /dev/disk/by-id/*)
    <h:c:t:l>         filter output list (def: '*:*:*:*' (all)). Meaning:
                      <host_num:controller:target:lun> or for NVMe:
                      <'N':ctl_num:cntlid:namespace_id>

List SCSI devices or hosts, followed by NVMe namespaces or controllers.
Many storage devices (e.g. SATA disks and USB attached storage) use SCSI
command sets and hence are also listed by this utility. Hyphenated long
option names can also take underscore (and vice versa).
Options (28)
OptionDescriptionSource
--json JO]|-j[=JOoutput in JSON instead of plain text.help
--js-file, -J JFN|-JJFN is a filename to which JSON output is written (def: stdout);help + man
--sysfsroot, -y PATH|-yassumes sysfs is mounted at PATH instead of the default '/sys' .help + man
--sysroot, -Y AR_PT|-Yset alternate root path (def: / ).help + man
-b, --briefreduces one line per device output to the tuple and the primary device name. (in the manual page but not in --help)man
-c, --classicThe output is similar to that obtained from 'cat /proc/scsi/scsi' . (in the manual page but not in --help)man
-C, --controllersLists NVMe controllers and SCSI hosts. (in the manual page but not in --help)man
-d, --deviceAfter outputting the (probable) SCSI device name the device node major and minor numbers are shown in brackets (e.g. "/dev/sda[8:0]"). (in the manual page but not in --help)man
-g, --genericOutput the SCSI generic device file name. (in the manual page but not in --help)man
-h, --helpOutput the usage message then exit. (in the manual page but not in --help)man
-H, --hostsList the SCSI hosts and NVMe controllers currently attached to the system. (in the manual page but not in --help)man
-k, --knameUse Linux default algorithm for naming devices (e.g. block major 8, minor 0 is "/dev/sda") rather than the "match by major and minor" in the "/dev" directory as discussed above. (in the manual page but not in --help)man
-L, --listOutput additional information in <attribute_name>=<value> pairs, one pair per line preceded by two spaces. (in the manual page but not in --help)man
-l, --longOutput additional information for each SCSI device (host). (in the manual page but not in --help)man
-U, --long-unitOutput logical unit name in full, if available. (in the manual page but not in --help)man
-x, --lunhexwhen this option is used once the LUN in the tuple (at the start of each device line) is shown in "T10" format which is up to 16 hexadecimal digits. (in the manual page but not in --help)man
-N, --no-nvmethis option excludes NVMe devices and controllers for the output. (in the manual page but not in --help)man
-D, --pdtthis option displays the SCSI Peripheral Device Type (PDT) in hex preceded by "0x". (in the manual page but not in --help)man
-p, --protectionOutput target (DIF) and initiator (DIX) protection types in that order to the right in one_line_per_device mode. (in the manual page but not in --help)man
-P, --protmodeOutputs the effective protection information mode for each disk device. (in the manual page but not in --help)man
-i, --scsi_idoutputs the udev derived matching id found in /dev/disk/by-id/scsi . (in the manual page but not in --help)man
-s, --sizePrint disk capacity in plain text form. (in the manual page but not in --help)man
-S, --sz-lbsPrint disk capacity as a number of logical blocks (which is the same as '-sss'). (in the manual page but not in --help)man
-t, --transportOutput transport information. (in the manual page but not in --help)man
-u, --unitOutput logical unit name, if available. (in the manual page but not in --help)man
-v, --verboseoutputs directory names where information is found. (in the manual page but not in --help)man
-V, --versionoutputs version information then exits. (in the manual page but not in --help)man
-w, --wwnadditionally outputs the WWN for disks. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.