write img file to sdcard on mac

1, show disk details on mac terminal,Or use df -h
diskutil list

2, find the sdcard disk(here is '/dev/disk2'),then unmount it
Or U will get error like 'Resource busy' for disk mounted
diskutil unmount /dev/disk2
Or trydiskutil unmountDisk /dev/disk2

3, then,write the imge to sdcard,It should be sometimes
sudo dd if=kali-2.1-rpi2.img of=/dev/disk2 bs=512k
More
sudo dd if=kali-2.1-rpi2.img of=/dev/disk2 bs=512k conv=noerror,sync
The parameter 'noerror' of conv is the process will skip it if occur error,
and the 'sync' is for fill the error location with empty data for stablity of the file system.
xzcat kali-$version-rpi2.img.xz | dd of=/dev/sdb bs=512k
Official site command is(for xz file)

$ ref
img download

你可能感兴趣的:(write img file to sdcard on mac)