Name

losetup

Synopsis

losetup [options] loopdevice [file]

System administration command. Set up and control loop devices. Attach a loop device to a regular file or block device, detach a loop device, or query a loop device. A loop device can be used to mount an image file as if it were a normal device.

Options

-d

Detach specified loopdevice.

-e encryption, -Enumber

Use specified kernel encryption module when performing writes and reads. (Usually NONE, DES, and XOR.) You may also specify the encryption module by number. When using DES encryption, you will be prompted for an initialization passphrase.

-o offset

Start reading data at offset bytes from the beginning of file.

-p fd

Read the passphrase from file descriptor fd.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.