1. DOWNLOAD UBUNTU
2. CONVERT THE DOWNLOADED FILE FORMAT
It is first necessary to convert the downloaded .iso file to a .img. This is done with the hdiutil command in Terminal.
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
Tip: OS X may append the file extension .dmg to the output file, so you’ll end up with ubuntu-14.04-desktop-i386.img.dmg
3. DETERMINE THE DEVICE NODE FOR THE USB DRIVE
diskutil list
Make a note of the output information. Then insert the USB drive and run the command again. Look for the difference and check that the capacity of the new drive matches the USB drive that you have inserted.
diskutil unmountDisk /dev/diskN
Where N denotes the node number assigned to the USB drive
4. CREATE THE BOOTABLE USB DRIVE
To create the USB drive, the command dd is used to copy and convert a file. This is a very powerful command and it should be used with care and caution.
If used incorrectly it is possible to corrupt the the hard drive of a Mac with catastrophic consequences meaning that you will not be able to boot into OS X. Double-check and triple-check that you have entered the command correctly.
sudo dd if=/path/to/ubuntu.img of=/dev/rdiskN bs=1m
Where N denotes the node number assigned to the USB drive
5. PREPARE TO REMOVE THE USB DRIVE
It may be that, on completion of the creation of the USB drive, a dialogue box pops up that says The disk you inserted was not readable by this computer.
There are three buttons: Initialize…, Ignore and Eject. Don’t click any of them!
At the command prompt, enter the command:
diskutil eject /dev/diskN
Where N is the node number assigned to the USB drive.