When I double click a dmg file it's mounted (or so I assume) in the filesystem. I want to explore the dmg file in the terminal for hidden files (like the background for example), but I'm not sure where it's mounted - I checked /media and /mnt, but it's not there.
All volumes, including DMGs, are mounted in
You can get a list of mounted volumes by typing
ls /Volumes in Terminal.
You can navigate to a Disk Image using