Skip to content

Instantly share code, notes, and snippets.

@agarie
Last active December 18, 2015 05:29
Show Gist options
  • Save agarie/5733378 to your computer and use it in GitHub Desktop.
Save agarie/5733378 to your computer and use it in GitHub Desktop.
How to create a USB bootable flash drive in OS X. I *always* forget this.
# From: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/iso.iso
# Run diskutil list and determine the device node assigned to your flash media (e.g. /dev/disk2).
diskutil list
# Replace N with the disk number from the last command.
diskutil unmountDisk /dev/diskN
# Copy the files!
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
# Eject the flash drive.
diskutil eject /dev/diskN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment