.\" Copyright (c) 2023 Benjamin Stürz .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .TH LSBLK 8 lsblk-@VERSION@ 2023-05-17 .SH NAME lsblk \- list block devices .SH SYNOPSIS .B lsblk [\fB-abinUuV\fR] [\fIdisk ...\fR] .SH DESCRIPTION The .B lsblk utility can be used to examine block devices attached to the system. If passed .I disk operands it lists the specified devices. Otherwise it lists all attached block devices. .SH OPTIONS .TP .B \-V prints version information to stdout, then exit. .TP .B \-a print all fields. .TP .B \-b don't scan for RAID volumes using .BR bio (4) . .TP .B \-i don't print fancy unicode characters, only print ASCII. .TP .B \-n don't print the header. .TP .B \-U also print the disklabel UID. .TP .B \-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. .SH EXIT STATUS The .B lsblk utility exits 0 on success, and >0 if an error occurs. .SH EXAMPLES The following line lists all block devices: .PP .RS 5 lsblk .RE The following line lists all fields of sd0: .PP .RS 5 lsblk -a sd0 .SH FIELDS .B NAME .RE .RS 5 The name of the disk/partition. .RE .B DUID .RE .RS 5 The disklabel UID of the disk. .RE .B SIZE .RE .RS 5 The size of the partition, not the filesystem. .RE .B USED .RE .RS 5 For disks: The amount of allocated disk space for partitions. .RE .RS 5 For mounted partitions: The amount of used space. .RE .B FREE .RE .RS 5 For disks: SIZE - FREE .RE .RS 5 For partitions: FS_SIZE - FREE .RE .B TYPE .RE .RS 5 For disks: The type of the disk. .RE .RS 5 For partitions: The type of data on the partition. .RE .B COMMENT .RE .RS 5 For all disks: The label of the disk. .RE .RS 5 For RAID disks: Additionally the status of the volume. .RE .RS 5 For mounted partitions: The first found current mount point. .SH SEE ALSO .BR disklabel (8) , .BR bio (4) , .BR df (1) .SH HISTORY The .B lsblk(8) utility was originally written by the .B util-linux project. This is an .I incompatible clone of the original \fBlsblk\fR. 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. .SH AUTHORS The .B lsblk program was written by Benjamin Stürz .