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-17
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 NAME
76 .RE
77 .RS 5
78 The name of the disk/partition.
80 .RE
81 .B DUID
82 .RE
83 .RS 5
84 The disklabel UID of the disk.
86 .RE
87 .B SIZE
88 .RE
89 .RS 5
90 The size of the partition, not the filesystem.
92 .RE
93 .B USED
94 .RE
95 .RS 5
96 For disks: The amount of allocated disk space for partitions.
97 .RE
98 .RS 5
99 For mounted partitions: The amount of used space.
101 .RE
102 .B FREE
103 .RE
104 .RS 5
105 For disks: SIZE - FREE
106 .RE
107 .RS 5
108 For partitions: FS_SIZE - FREE
110 .RE
111 .B TYPE
112 .RE
113 .RS 5
114 For disks: The type of the disk.
115 .RE
116 .RS 5
117 For partitions: The type of data on the partition.
119 .RE
120 .B COMMENT
121 .RE
122 .RS 5
123 For all disks: The label of the disk.
124 .RE
125 .RS 5
126 For RAID disks: Additionally the status of the volume.
127 .RE
128 .RS 5
129 For mounted partitions: The first found current mount point.
130 .SH SEE ALSO
131 .BR disklabel (8) ,
132 .BR bio (4) ,
133 .BR df (1)
134 .SH HISTORY
135 The
136 .B lsblk(8)
137 utility was originally written by the
138 .B util-linux
139 project.
140 This is an
141 .I incompatible
142 clone of the original \fBlsblk\fR.
143 It is incompatible because it doesn't support
144 the same set of options as the original
145 and because of differences in the output.
146 More incompatibilities are caused by specific features only being available
147 on either Linux or OpenBSD.
148 .SH AUTHORS
149 The
150 .B lsblk
151 program was written by Benjamin Stürz <benni@stuerz.xyz>.