Skip to content

Instantly share code, notes, and snippets.

@eneko
Last active March 12, 2023 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eneko/7ee9d6e59be6b4b3635cecb0efda6355 to your computer and use it in GitHub Desktop.
Save eneko/7ee9d6e59be6b4b3635cecb0efda6355 to your computer and use it in GitHub Desktop.
Create DMG image from folder
#
# <filename>.dmg can be a path to a file on an existing folder
# <window title> appears when the DMG is open
# <file system> APFS, HFS+, etc
# UDRW format makes the image read/write (use UDSP for read-only)
#
hdiutil create <filename>.dmg -volname "<window title>" -fs APFS -format UDRW -srcfolder <path/to/folder>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment