LSBLK(8) LSBLK(8) lsblk - lsblk [] [...] lsblk . lsblk sysfs udev . udev lsblk udev, LABEL, UUID . ' root. By default, the command prints all block devices (except RAM disks) in a tree-like format. The same device can be repeated in the tree if it relates to other devices. The --merge option is recommended for more complicated setups to gather groups of devices and describe complex N:M relationships. The tree-like output (or children[] array in the JSON output) is enabled only if NAME column it present in the output or when --tree command line option is used. See also --nodeps and --list to control the tree formatting. , , --fs --topology, . , , . --output - , . lsblk --list-columns . , lsblk , udev . udevadm settle lsblk, udev. ' . , . lsblk MOUNTPOINT MOUNTPOINTS (). MOUNTPOINT (, ), MOUNTPOINTS , ' . -A, --noempty . -a, --all , '. -b, --bytes , . , , , , 2^10 (1024). ; : <<1 >> <<1 >> <<1 K>> <<1 M>>, <<>>, . -H, --list-columns List the available columns, use with --json or --raw to get output in machine-readable format. -D, --discard (TRIM, UNMAP) . -d, --nodeps - . , lsblk --nodeps /dev/sda sda. -E, --dedup . , . , , -E WWN. -e, --exclude , , . , ' (=1) , --all. . --list, . -f, --fs . -o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS. RAID blkid(8). --hyperlink[=] Print mountpoint paths as terminal hyperlinks. The mode can be set to "always", "never", or "auto". The optional argument when can be set to "auto", "never", or "always". If the when argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal. -I, --include , , . . --list, . -i, --ascii ASCII . -J, --json JSON. --output, --tree, . , children[] , NAME --tree. -l, --list . ' , 2.34, , --pairs --raw ( ). -M, --merge RAID . . -m, --perms , . -o NAME,SIZE,OWNER,GROUP,MODE. -N, --nvme NVMe. -v, --virtio virtio. -n, --noheadings . -o, --output , . --list-columns, *). . <> (. --tree). , + (, lsblk -o +UUID) -O, --output-all . -P, --pairs ="". . (\x<>). . --shell. -p, --paths . -Q, --filter Print only the devices that meet the conditions specified by the expr. The filter is assessed prior to lsblk collecting data for all output columns. Only the necessary data for the lazy evaluation of the expression is retrieved from the system. This approach can enhance performance when compared to post-filtering, as commonly done by tools such as grep(1). This feature is EXPERIMENTAL. See also scols-filter(5). For example exclude sda and sdb, but print everything else ('!~' is a negative regular expression matching operator): lsblk --filter 'NAME !~ "sd[ab]"' --highlight Colorize lines matching the expression. This feature is EXPERIMENTAL. See also scols-filter(5). --ct [: [: ]] Define a custom counter. The counters are printed after the standard output. The name is the custom name of the counter, the optional param is the name of the column to be used for the counter, and the optional function specifies the aggregation function, supported functions are: count, min, max, or sum. The default is count. If the param is not specified, then the counter counts the number of lines. This feature is EXPERIMENTAL. See also --ct-filter. For example, --ct MyCounter:SIZE:sum will count the summary for SIZE from all lines; and to count the number of SATA disks, it is possible to use: lsblk --ct-filter 'TYPE=="disk" && TRAN=="sata"' --ct "Number of SATA devices" --ct-filter Define a restriction for the next counter. This feature is EXPERIMENTAL. See also --ct and scols-filter(5). For example, aggregate sizes by device type: lsblk --ct-filter 'TYPE=="part"' --ct Partitions:SIZE:sum \ --ct-filter 'TYPE=="disk"' --ct WholeDisks:SIZE:sum -r, --raw . . (\x<>) NAME, KNAME, LABEL, PARTLABEL MOUNTPOINT. -S, --scsi SCSI. , . -s, --inverse . --list, . -T, --tree[=] . , . NAME. -t, --topology . -o NAME,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,RA,WSAME. -w, --width . , , . lsblk , . lsblk watch(1). -x, --sort . --list. --tree , . -y, --shell , , , , MIN_IO FSUSE_PCT MIN-IO FSUSE%. , , --pairs. , --pairs 2.37, --shell. -z, --zoned ' . --sysroot Linux, , lsblk. Linux, . udev. --properties-by This option specifies the methods used by lsblk to gather information about filesystems and partition tables. The list is a comma-separated list of method names. The default setting is "file,udev,blkid". The supported methods are: udev Reads data from udev DB. If unsuccessful, it continues to the next probing method. blkid Reads data directly from the device using libblkid. If unsuccessful, it continues to the next probing method. file Reads data from a file. This method is only used if the --sysroot option is specified. This method always stops probing if used. none . . -h, --help . -V, --version . 0 1 32 64 , LSBLK_DEBUG=all lsblk. LIBBLKID_DEBUG=all libblkid. LIBMOUNT_DEBUG=all libmount. LIBSMARTCOLS_DEBUG=all libsmartcols. LIBSMARTCOLS_DEBUG_PADDING=on . ( ) . lsblk :. /sys/dev/block. sysfs ' 2.6.27 ( 2008 ). , , CONFIG_SYSFS . Milan Broz , Karel Zak blkid(8), findmnt(8) ls(1), scols-filter(5) lsblk util-linux, Linux . util-linux 2.41 2025-03-29 LSBLK(8)