Skip to content

Instantly share code, notes, and snippets.

@christopher-baek
Last active August 18, 2022 21:00
Show Gist options
  • Save christopher-baek/5af6f6bade3def061852adf83dc24675 to your computer and use it in GitHub Desktop.
Save christopher-baek/5af6f6bade3def061852adf83dc24675 to your computer and use it in GitHub Desktop.

Convert *.iso to *.dmg format

hdiutil will append the "*.dmg" file extension

hdiutil convert -format UDRW -o /path/to/target /path/to/source.iso

Find USB drive

diskutil list

Unmount USB drive

diskutil unmountDisk /dev/diskN

Write to USB

sudo dd if=/path/to/target.dmg of=/dev/rdiskN bs=1m

OPTIONAL: Write to USB with progress

sudo dd if=/path/to/target.dmg | pv | sudo dd of=/dev/rdiskN bs=1m

Eject USB

diskutil eject /dev/diskN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment