diff --git a/pages/linux/losetup.md b/pages/linux/losetup.md index 2fc0aa281..9a861fca0 100644 --- a/pages/linux/losetup.md +++ b/pages/linux/losetup.md @@ -17,3 +17,11 @@ - Detach a given loop device: `sudo losetup -d /dev/{{loop}}` + +- Attach a file to a new free loop device and scan the device for partitions: + +`sudo losetup --show --partscan -f /{{path/to/file}}` + +- Attach a file to a read-only loop device: + +`sudo losetup --read-only /dev/{{loop}} /{{path/to/file}}`