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)
| Option | Description | Source |
|---|---|---|
--json JO]|-j[=JO | output in JSON instead of plain text. | help |
--js-file, -J JFN|-J | JFN is a filename to which JSON output is written (def: stdout); | help + man |
--sysfsroot, -y PATH|-y | assumes sysfs is mounted at PATH instead of the default '/sys' . | help + man |
--sysroot, -Y AR_PT|-Y | set alternate root path (def: / ). | help + man |
-b, --brief | reduces one line per device output to the tuple and the primary device name. (in the manual page but not in --help) | man |
-c, --classic | The output is similar to that obtained from 'cat /proc/scsi/scsi' . (in the manual page but not in --help) | man |
-C, --controllers | Lists NVMe controllers and SCSI hosts. (in the manual page but not in --help) | man |
-d, --device | After 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, --generic | Output the SCSI generic device file name. (in the manual page but not in --help) | man |
-h, --help | Output the usage message then exit. (in the manual page but not in --help) | man |
-H, --hosts | List the SCSI hosts and NVMe controllers currently attached to the system. (in the manual page but not in --help) | man |
-k, --kname | Use 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, --list | Output 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, --long | Output additional information for each SCSI device (host). (in the manual page but not in --help) | man |
-U, --long-unit | Output logical unit name in full, if available. (in the manual page but not in --help) | man |
-x, --lunhex | when 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-nvme | this option excludes NVMe devices and controllers for the output. (in the manual page but not in --help) | man |
-D, --pdt | this option displays the SCSI Peripheral Device Type (PDT) in hex preceded by "0x". (in the manual page but not in --help) | man |
-p, --protection | Output 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, --protmode | Outputs the effective protection information mode for each disk device. (in the manual page but not in --help) | man |
-i, --scsi_id | outputs the udev derived matching id found in /dev/disk/by-id/scsi . (in the manual page but not in --help) | man |
-s, --size | Print disk capacity in plain text form. (in the manual page but not in --help) | man |
-S, --sz-lbs | Print disk capacity as a number of logical blocks (which is the same as '-sss'). (in the manual page but not in --help) | man |
-t, --transport | Output transport information. (in the manual page but not in --help) | man |
-u, --unit | Output logical unit name, if available. (in the manual page but not in --help) | man |
-v, --verbose | outputs directory names where information is found. (in the manual page but not in --help) | man |
-V, --version | outputs version information then exits. (in the manual page but not in --help) | man |
-w, --wwn | additionally outputs the WWN for disks. (in the manual page but not in --help) | man |