Disconnect a loop device from its image file.
Section: Mount and Unmount
Detach a loop device
bash
bash
sudo losetup -d /dev/loop0Explanation
Disconnect a loop device from its image file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Mount and Unmount
Mount a device to a directory
Mount a block device using filesystem auto-detection.
Mount a filesystem read-only
Useful for safe inspection or recovery work.