is there terminal command that shows/reads the file system(s) (and versions) of a .iso or .dmg image?

E.g. Udf 2.50/Joliet/hfs+

  • Perhaps mount the image first and then use diskutil info /dev/<disk#>?
    – Joy Jin
    Dec 25, 2020 at 12:42
  • I’ve linked in my answer to some details like @JoyJin has helpfully commented. apple.stackexchange.com/a/73931/5472 as asked this is basically a yes/no question.
    – bmike
    Dec 25, 2020 at 12:48
  • Read the manual pages for hdiutil and diskutil. You can read the manual page for command in Terminal by typing command and then right-click on it and select: Open man Page Dec 25, 2020 at 14:00

1 Answer 1


Yes - you can read the details from ISO and DMG from the command line using OS provided tools.

The primary command line tool to manipulate disk images is hdiutil and you may need to attach / authenticate / mount them and use diskutil to determine file systems contained within a dmg or iso if the wrapper doesn't contain the information you require.

The option I use is hdiutil imageinfo but also hdiutil fsinfo has exceptional details on these containers that may be useful to you.

% hdiutil imageinfo foo.dmg
Format Description: UDIF read-only compressed (zlib)
Class Name: CUDIFDiskImage
Checksum Type: CRC32
Size Information:
        CUDIFEncoding-bytes-total: 1015091
        Total Empty Bytes: 13726208
        Sector Count: 30730
        Total Bytes: 15733760
        CUDIFEncoding-bytes-wasted: 0
        Total Non-Empty Bytes: 2007552
        Compressed Ratio: 0.50548329507778633
        CUDIFEncoding-bytes-in-use: 1015091
        Compressed Bytes: 1015091
Checksum Value: $81F7C3A0
        0: /Users/me/foo.dmg
Partition Information:
                Name: disk image (Apple_HFS : 2)
                Partition Number: 1
                Checksum Type: CRC32
                Checksum Value: $AAEEB101
                Name: Driver Descriptor Map (DDM : 0)
                Partition Number: -1
                Checksum Type: CRC32
                Checksum Value: $77150592
                Name:  (Apple_Free : 3)
                Partition Number: 2
                Checksum Type: CRC32
                Checksum Value: $00000000
                Name: Apple (Apple_partition_map : 1)
                Partition Number: 0
                Checksum Type: CRC32
                Checksum Value: $5AC9B785
Format: UDZO

There are dozens of verbs to send to the tool, so I suppose the one you need may vary based on your specific query against the data contained within the packaged file.

  • But hdiutil does not show me the file systems of an existing image.
    – user400439
    Dec 25, 2020 at 12:37
  • 1
    ISO and DMG are packages. Their version is shown in info. @user400439 perhaps the tour will help you refine your question by showing some research? There may be several questions here TBH.
    – bmike
    Dec 25, 2020 at 12:41
  • Does hdiutil fsid get the enclosed filesystsm? I can't test as I don't have anything that's not HFS+
    – Tetsujin
    Dec 25, 2020 at 13:25
  • 1
    @Tetsujin, Yes, hdiutil fsid works on the ISO images I tested it on. Which reported the expected ISO 9660 filesystem as well as UDF, and on a hybrid disc it even reported a FAT12 partition, among others on that disc. Dec 25, 2020 at 14:11
  • hdiutil imageinfo is the one I use the most, but OP here is so vague, we can't really guess what level of knowledge they have, what they're doing or what research / actual problem they face is... (do they know what a man page is? do they really just need to know which ISO are PC and need a one liner with awk|sed|grep treatment, etc...
    – bmike
    Dec 25, 2020 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .