1LSBLK(8)                     System Administration                    LSBLK(8)
2
3
4

NAME

6       lsblk - list block devices
7

SYNOPSIS

9       lsblk [options] [device...]
10

DESCRIPTION

12       lsblk lists information about all available or the specified block
13       devices. The lsblk command reads the sysfs filesystem and udev db to
14       gather information. If the udev db is not available or lsblk is
15       compiled without udev support, then it tries to read LABELs, UUIDs and
16       filesystem types from the block device. In this case root permissions
17       are necessary.
18
19       The command prints all block devices (except RAM disks) in a tree-like
20       format by default. Use lsblk --help to get a list of all available
21       columns.
22
23       The default output, as well as the default output from options like
24       --fs and --topology, is subject to change. So whenever possible, you
25       should avoid using default outputs in your scripts. Always explicitly
26       define expected columns by using --output columns-list and --list in
27       environments where a stable output is required.
28
29       Note that lsblk might be executed in time when udev does not have all
30       information about recently added or modified devices yet. In this case
31       it is recommended to use udevadm settle before lsblk to synchronize
32       with udev.
33
34       The relationship between block devices and filesystems is not always
35       one-to-one. The filesystem may use more block devices, or the same
36       filesystem may be accessible by more paths. This is the reason why
37       lsblk provides MOUNTPOINT and MOUNTPOINTS (pl.) columns. The column
38       MOUNTPOINT displays only one mount point (usually the last mounted
39       instance of the filesystem), and the column MOUNTPOINTS displays by
40       multi-line cell all mount points associated with the device.
41

OPTIONS

43       -A, --noempty
44           Don’t print empty devices.
45
46       -a, --all
47           Disable all built-in filters and list all empty devices and RAM
48           disk devices too.
49
50       -b, --bytes
51           Print the sizes in bytes rather than in a human-readable format.
52
53           By default, the unit, sizes are expressed in, is byte, and unit
54           prefixes are in power of 2^10 (1024). Abbreviations of symbols are
55           exhibited truncated in order to reach a better readability, by
56           exhibiting alone the first letter of them; examples: "1 KiB" and "1
57           MiB" are respectively exhibited as "1 K" and "1 M", then omitting
58           on purpose the mention "iB", which is part of these abbreviations.
59
60       -D, --discard
61           Print information about the discarding capabilities (TRIM, UNMAP)
62           for each device.
63
64       -d, --nodeps
65           Do not print holder devices or slaves. For example, lsblk --nodeps
66           /dev/sda prints information about the sda device only.
67
68       -E, --dedup column
69           Use