How to mount IMG files in Xubuntu?

I’ve noticed in Gnome based distro’s that you can mount an IMG file or ISO file virtually. Well, I’ve taken a couple years step back and gone back to xubuntu. I’ve noticed that Xubuntu doesn’t have this option, which makes me think its a gnome only thing, but I don’t know either.

Is the IMG/ISO mounting tool in base Ubuntu a package I can install or is it a tool in Gnome?

1 Like

No, you don’t need any packages nor is it a Gnome-thing. You need the normal mount command, but you’ll need to create a loopback device. The man page for mount has the specifics, but it’s a long way down! (about 2200 lines :astonished: ) Google is your friend here!

1 Like

i recommend using losetup. it should be able to auto-detect the partitions (with some switches) and the loop should be accessible by programs exactly as if it where a normal block device.

1 Like

I seem to recall (a bit unsure to be honest) that gnome-disk-utility seems to have the ability to mount an img file.

Googling around, it seems Thunar can have a Context command added (right click.) that runs a mount in the backend, if you wanted to do it from the Gui with the mouse rather than the command line?

1 Like

Gnome gvfs does this. I think kde has an equivalent that will add a context menu to your file browser in the GUI.

Otherwise you will need to do something like [code]mount -o loopback to manually mount an image file from the terminal.