.sp
.in +5
.B losetup
-.I loopdev
+[\fIloopdev\fP]
.sp
.B losetup -l
.RB [ \-a ]
.B "losetup \-D"
.sp
.in -5
-Print the name of the first unused loop device:
-.sp
-.in +5
-.B "losetup \-f"
-.sp
-.in -5
Set up a loop device:
.sp
.in +5
.IR offset ]
.RB [ \-\-sizelimit
.IR size ]
+.RB [ \-\-sector\-size
+.IR size ]
.in +8
.RB [ \-Pr ]
.RB [ \-\-show ] " \-f" | \fIloopdev\fP
without \fB--list)\fR is deprecated.
.TP
.BR \-d , " \-\-detach " \fIloopdev\fR...
-Detach the file or device associated with the specified loop device(s).
+Detach the file or device associated with the specified loop device(s). Note
+that since Linux v3.7 kernel uses "lazy device destruction". The detach
+operation does not return EBUSY error anymore if device is actively used by
+system, but it is marked by autoclear flag and destroyed later.
.TP
.BR \-D , " \-\-detach\-all"
Detach all associated loop devices.
Show the status of all loop devices associated with the given \fIfile\fR.
.TP
.BR \-o , " \-\-offset " \fIoffset
-The data start is moved \fIoffset\fP bytes into the specified file or device.
+The data start is moved \fIoffset\fP bytes into the specified file or device. The \fIoffset\fP
+may be followed by the multiplicative suffixes; see above.
.IP "\fB\-\-sizelimit \fIsize\fP"
-The data end is set to no more than \fIsize\fP bytes after the data start.
+The data end is set to no more than \fIsize\fP bytes after the data start. The \fIsize\fP
+may be followed by the multiplicative suffixes; see above.
+.TP
+.BR \-b , " \-\-sector-size " \fIsize
+Set the logical sector size of the loop device in bytes (since Linux 4.14). The
+option may be used when create a new loop device as well as stand-alone command
+to modify sector size of the already existing loop device.
.TP
.BR \-c , " \-\-set\-capacity " \fIloopdev
Force the loop driver to reread the size of the file associated with the
Specify the columns that are to be printed for the \fB\-\-list\fP output.
Use \fB\-\-help\fR to get a list of all supported columns.
.TP
+.B \-\-output\-all
+Output all available columns.
+.TP
.BR \-n , " \-\-noheadings"
Don't print headings for \fB\-\-list\fP output format.
.IP "\fB\-\-raw\fP"
The following commands can be used as an example of using the loop device.
.nf
.IP
-# dd if=/dev/zero of=~/file.img bs=1MiB count=10
+# dd if=/dev/zero of=~/file.img bs=1024k count=10
# losetup --find --show ~/file.img
/dev/loop0
# mkfs -t ext2 /dev/loop0