Ever had trouble writing an .img file to an SD card for your Raspberry Pi? Here’s how to do it without installing any other programs.
Download Your Image
Firstly, you need to download the latest image that you want to write. I personally like to use the full Raspbian image. Download this to your Mac, somewhere memorable.
To start the writing process, you need to find the path of your drive with:
You can identify your SD card by the fact it says ‘external’ and the size, in my case, is 8.0GB.
Now you need to use that path (mine is /dev/disk2) for the next command, which will wipe your disk:
diskutil eraseDisk ExFAT disk2 /dev/disk2
Once you’ve seen that the disk has been erased, you can move onto writing your .img file to your SD.
Here you need to know both the path of the .img you downloaded and the drive again:
sudo dd if=/Users/waynecovell/Desktop/2019-07-10-raspbian-buster-full.img of=/dev/disk2 bs=1m
It may look like nothing is happening at this point – and it will take a long time. To check progress, just hit Ctrl+T to see progress like this:
Boom! Done! Easy. Just pop the SD card into your Raspberry Pi and get going.
If you happen to encounter ‘resource busy‘, like I did, you can run this command after formatting your SD, to unmount it: