Updated 2022:

It seems that diskutil has made things easier. These are all the commands you should need now.

diskutil list # found /dev/disk2
diskutil umountDisk /dev/disk2
sudo dd if=xxxxx.iso of=/dev/disk2 bs=1m
diskutil eject /dev/disk2

I’ve been installing Linux from my laptop on hardware for a while now. I can never remember how to do it, so I keep googling for this. Being I like distilling information down to the more important parts, here is my “generic” way of doing what is described in that link:

wget http://some_iso_on_some_site/image.iso
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/image.iso
mv ~/path/to/target.img.dmg  ~/path/to/target.img
# ideally you already have your flash drive inserted
diskutil list
diskutil unmountDisk /dev/disk<the_number_of_the_disk>
sudo dd if=/path/to/target.img of=/dev/rdisk<the_number_of_the_disk> bs=1m
diskutil eject /dev/disk<the_number_of_the_disk>

Maybe I should script this…