OS Manuals

/usr/bin/lsblk

Block device list tool from util-linux

From lsblk 2.42.4-r2 (os), captured 2026-11-05 by running lsblk --help (exit 0). permalink

Usage:
 lsblk [options] [<device> ...]

List information about block devices.

Options:
 -A, --noempty        don't print empty devices
 -D, --discard        print discard capabilities
 -E, --dedup <column> de-duplicate output by <column>
 -I, --include <list> show only devices with specified major numbers
 -J, --json           use JSON output format
 -M, --merge          group parents of sub-trees (RAIDs, Multi-path)
 -O, --output-all     output all columns
 -P, --pairs          use key="value" output format
 -Q, --filter <expr>  print only lines matching the expression
     --highlight <expr> colorize lines matching the expression
     --ct-filter <expr> restrict the next counter
     --ct <name>[:<param>[:<func>]] define a custom counter
 -S, --scsi           output info about SCSI devices
 -N, --nvme           output info about NVMe devices
 -v, --virtio         output info about virtio devices
 -T, --tree[=<column>] use tree format output
 -a, --all            print all devices
 -b, --bytes          print SIZE in bytes instead of a human-readable format
 -d, --nodeps         don't print slaves or holders
 -e, --exclude <list> exclude devices by major number (default: RAM disks)
 -f, --fs             output info about filesystems
     --hyperlink[=<when>]
                      print paths as hyperlinks (always|never|auto)
 -i, --ascii          use ascii characters only
 -l, --list           use list format output
 -m, --perms          output info about permissions
 -n, --noheadings     don't print headings
 -o, --output <list>  output columns (see --list-columns)
 -p, --paths          print complete device path
 -r, --raw            use raw output format
 -s, --inverse        inverse dependencies
 -t, --topology       output info about topology
 -w, --width <num>    specifies output width as number of characters
 -x, --sort <column>  sort output by <column>
 -y, --shell          use column names that can be used as shell variables
 -z, --zoned          print zone related information
     --sysroot <dir>  use specified directory as system root
     --properties-by <list>
                      methods used to gather data (default: file,udev,blkid)

 -H, --list-columns   list the available columns
 -h, --help           display this help
 -V, --version        display version

For more details see lsblk(8).
Options (40)
OptionDescriptionSource
-A, --noemptyDon’t print empty devices.help + man
-D, --discardPrint information about the discarding capabilities (TRIM, UNMAP) for each device.help + man
-J, --jsonUse JSON output format.help + man
-M, --mergeGroup parents of sub-trees to provide more readable output for RAIDs and Multi-path devices.help + man
-O, --output-allOutput all available columns.help + man
-P, --pairsProduce output in the form of key="value" pairs.help + man
-Q, --filter exprPrint only the devices that meet the conditions specified by expression.help + man
-S, --scsiOutput info about SCSI devices only.help + man
-N, --nvmeOutput info about NVMe devices only.help + man
-v, --virtioOutput info about virtio devices only.help + man
-a, --allDisable all built-in filters and list all empty devices and RAM disk devices too.help + man
-b, --bytesPrint sizes in bytes rather than in human-readable form.help + man
-d, --nodepsDo not print holder devices or slaves.help + man
-f, --fsOutput info about filesystems.help + man
--hyperlink whenprint paths as hyperlinks (always|never|auto)help + man
-i, --asciiUse ASCII characters for tree formatting.help + man
-l, --listProduce output in the form of a list.help + man
-m, --permsOutput info about device owner, group and mode.help + man
-n, --noheadingsDo not print a header line.help + man
-o, --output listSpecify which output columns to print.help + man
-p, --pathsprint complete device pathhelp + man
-r, --rawProduce output in raw format.help + man
-s, --inversePrint dependencies in inverse order.help + man
-t, --topologyOutput info about block-device topology.help + man
-w, --width numSpecifies output width as a number of characters.help + man
-x, --sort columnSort output lines by column.help + man
-y, --shellThe column name will be modified to contain only characters allowed for shell variable identifiers, for example, MIN_IO and FSUSE_PCT instead of MIN-IO and FSUSE%.help + man
-z, --zonedPrint the zone related information for each device.help + man
--sysroot dirGather data for a Linux instance other than the instance from which the lsblk command is issued.help + man
--properties-by listThis option specifies the methods used by lsblk to gather information about filesystems and partition tables.help + man
-H, --list-columnsList the columns that can be specified with the --output option.help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man
-E, --dedup columnUse column as a de-duplication key to de-duplicate output tree. (in the manual page but not in --help)man
-e, --exclude listExclude the devices specified by the comma-separated list of major device numbers. (in the manual page but not in --help)man
-I, --include listInclude devices specified by the comma-separated list of major device numbers. (in the manual page but not in --help)man
--highlight expressionColorize lines matching expression. (in the manual page but not in --help)man
--ct name[:parameter[:functionDefine a custom counter. (in the manual page but not in --help)man
--ct-filter expressionDefine a restriction for the next counter. (in the manual page but not in --help)man
-T, --tree columnForce tree-like output format. (in the manual page but not in --help)man
Exit status (4) from the manual page
0success
1failure
32none of specified devices found
64some specified devices found, some not found

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