Skip to content
Search

Losetup

lastmod 2025-01-09created 2022-06-235 edits

set up and control loop devices

What is a loop device

A regular file mounted as a file system.

See Korean: 루프 장치 for details.

List

losetup -a

Unmount a loop device

Unmounting a loop device is very simple. We will use the umount command for this.

sudo umount /dev/loop9

You can clearly see that the loop9 block was the Brave browser installed as a snap, and it is no longer mounted and cannot be run.

Detach a loop device (Detach)

First make sure the loop device is unmounted, then use the -d (Detach) option to detach the file from the loop device.

sudo losetup -d /dev/loop9

Delete a loop device

sudo rm /dev/loop9

See also

author Zer0 sitemap