Prep SD card with image
format the card
http://www.makeuseof.com/tag/write-format-manage-sd-card-linux/
dd if=/dev/zero of=/dev/sdc
WARNING: this will wipe the card, make sure the target is correct. of is target and /dev/sdc is a disk in this case
Download the image to copy
Find a copy of the image you want online and start download. In this example Kali:
https://www.offensive-security.com/kali-linux-arm-images/
prep the image
unzip the image
xz -d kali-2017.01-rpi2.img.xz
unmount sd card
linux`lsblk # verify disk
sudo umount /dev/sdc1`
mac
diskutil list diskutil unmountDisk /dev/sdc1
copy image to sd card
sudo dd if=kali-2017.01-rpi2.img of=/dev/sdc1 bs=1m
cleanly unmount sd card
diskutil eject /dev/sdc1