Blob


1 .\" Copyright (c) 2023 Benjamin Stürz <benni@stuerz.xyz>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .TH LSBLK 8 lsblk-@VERSION@ 2023-05-05
15 .SH NAME
16 lsblk \- list block devices
17 .SH SYNOPSIS
18 .B lsblk
19 [\fB-abinUuV\fR]
20 [\fIdisk ...\fR]
21 .SH DESCRIPTION
22 The
23 .B lsblk
24 utility can be used to examine block devices attached to the system.
25 If passed
26 .I disk
27 operands it lists the specified devices.
28 Otherwise it lists all attached block devices.
29 .SH OPTIONS
30 .TP
31 .B \-V
32 prints version information to stdout, then exit.
33 .TP
34 .B \-a
35 print all fields.
36 .TP
37 .B \-b
38 don't scan for RAID volumes using
39 .BR bio (4) .
40 .TP
41 .B \-i
42 don't print fancy unicode characters, only print ASCII.
43 .TP
44 .B \-n
45 don't print the header.
46 .TP
47 .B \-U
48 also print the disklabel UID.
49 .TP
50 .B \-u
51 also print the filesystem usage of each partition
52 and the disklabel usage of each disk.
54 Note: The disklabel usage is calculated by
55 summing the size of all (except "c") partitions.
57 Note 2: lsblk shows the total amount of free space,
58 including space reserved for /root.
60 .SH EXIT STATUS
61 The
62 .B lsblk
63 utility exits 0 on success, and >0 if an error occurs.
65 .SH EXAMPLES
66 The following line lists all block devices:
67 .PP
68 .RS 5
69 lsblk
71 .RE
72 The following line lists all fields of sd0:
73 .PP
74 .RS 5
75 lsblk -a sd0
77 .SH FIELDS
78 .B TODO
79 Explain the exact meaning of every field.
81 .SH SEE ALSO
82 .BR disklabel (8) ,
83 .BR bio (4) ,
84 .BR df (1)
86 .SH HISTORY
87 The
88 .B lsblk(8)
89 utility was originally written by the
90 .B util-linux
91 project.
92 This is an
93 .I incompatible
94 clone of the original \fBlsblk\fR.
95 It is incompatible because it doesn't support
96 the same set of options as the original
97 and because of differences in the output.
98 More incompatibilities are caused by specific features only being available
99 on either Linux or OpenBSD.