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.
59 .SH EXIT STATUS
60 The
61 .B lsblk
62 utility exits 0 on success, and >0 if an error occurs.
63 .SH EXAMPLES
64 The following line lists all block devices:
65 .PP
66 .RS 5
67 lsblk
69 .RE
70 The following line lists all fields of sd0:
71 .PP
72 .RS 5
73 lsblk -a sd0
74 .SH FIELDS
75 .B TODO
76 Explain the exact meaning of every field.
77 .SH SEE ALSO
78 .BR disklabel (8) ,
79 .BR bio (4) ,
80 .BR df (1)
81 .SH HISTORY
82 The
83 .B lsblk(8)
84 utility was originally written by the
85 .B util-linux
86 project.
87 This is an
88 .I incompatible
89 clone of the original \fBlsblk\fR.
90 It is incompatible because it doesn't support
91 the same set of options as the original
92 and because of differences in the output.
93 More incompatibilities are caused by specific features only being available
94 on either Linux or OpenBSD.