Options (6)
-a, --allbooleanList loop devices with detailed info
Example:
losetup {{[-a|--all]}}-P, --partscanbooleanAttach a file to a new free loop device and scan the device for partitions
Example:
sudo losetup --show {{[-P|--partscan]}} {{[-f|--find]}} /{{path/to/file}}-f, --findbooleanAttach a file to a new free loop device and scan the device for partitions
Example:
sudo losetup --show {{[-P|--partscan]}} {{[-f|--find]}} /{{path/to/file}}-r, --read-onlybooleanAttach a file to a read-only loop device
Example:
sudo losetup {{[-r|--read-only]}} {{/dev/loop}} /{{path/to/file}}-D, --detach-allbooleanDetach all loop devices
Example:
sudo losetup {{[-D|--detach-all]}}-d, --detachbooleanDetach a given loop device
Example:
sudo losetup {{[-d|--detach]}} {{/dev/loop}}Examples (6)
List loop devices with detailed info
losetup [-a|--all]Attach a file to a new free loop device and scan the device for partitions
made by @shridhargupta | data from tldr-pages