LSBLK(8)

NAME
lsblk - list block devices

SYNOPSIS
lsblk [-abinUuV] [disk ...]

DESCRIPTION
The lsblk utility can be used to examine block devices attached to the system. If passed disk operands it lists the specified devices. Otherwise it lists all attached block devices.

OPTIONS

-V  prints version information to stdout, then exit.

-a  print all fields.

-b  don't scan for RAID volumes using bio(4).

-i  don't print fancy unicode characters, only print ASCII.

-n  don't print the header.

-U  also print the disklabel UID.

-u  also print the filesystem usage of each partition and the disklabel usage of each disk. Note: The disklabel usage is calculated by summing the size of all (except "c") partitions. Note 2: lsblk shows the total amount of free space, including space reserved for /root.

EXIT STATUS
The lsblk utility exits 0 on success, and >0 if an error occurs.

EXAMPLES
The following line lists all block devices:

    lsblk
The following line lists all fields of sd0:

    lsblk -a sd0

FIELDS
NAME
    The name of the disk/partition.
DUID
    The disklabel UID of the disk.
SIZE
    The size of the partition, not the filesystem.
USED
    For disks: The amount of allocated disk space for partitions.
    For mounted partitions: The amount of used space.
FREE
    For disks: SIZE - FREE
    For partitions: FS_SIZE - FREE
TYPE
    For disks: The type of the disk.
    For partitions: The type of data on the partition.
COMMENT
    For all disks: The label of the disk.
    For RAID disks: Additionally the status of the volume.
    For mounted partitions: The first found current mount point.

SEE ALSO
disklabel(8), bio(4), df(1)

HISTORY
The lsblk(8) utility was originally written by the util-linux project. This is an incompatible clone of the original lsblk. It is incompatible because it doesn't support the same set of options as the original and because of differences in the output. More incompatibilities are caused by specific features only being available on either Linux or OpenBSD.

AUTHORS
The lsblk program was written by Benjamin Stürz <benni@stuerz.xyz>.