Build an ISO Image from a Folder with hdiutil makehybrid
Turn any folder into a standard ISO 9660 disc image without third-party software.
Run hdiutil makehybrid -iso -joliet -o ~/Desktop/disc.iso ~/Desktop/IMG_FOLDER to create disc.iso containing that folder's contents.
01Command
Command
$ hdiutil makehybrid -iso -joliet -o ~/Desktop/disc.iso ~/Desktop/IMG_FOLDER02What it does
makehybrid builds an image in one pass; -iso produces the ISO 9660 layer that VMs and optical tools expect, and -joliet adds the Joliet extension so filenames keep their case and length instead of being mangled to 8.3 DOS-style names. Point the last argument at any folder (or existing .dmg to convert) and the result mounts anywhere ISOs are accepted.
03Risk
!Warning: The ISO is read-only; it snapshots the folder as it is, so tidy up file names and layout before running the command.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- hdiutil - Attach/Detach or Create Disk ImagesEvidence: Documents the makehybrid verb with -iso (ISO 9660) and -joliet (Joliet long-name extension) options and -o for the output image.
- hdiutil(1) man pageEvidence: The hdiutil man page describes makehybrid, including the -iso and -joliet flags for creating an ISO 9660/Joliet filesystem image from a source folder.
Last verified: 2026-09-19 · Category: Files & Folders