How to install Raspbian to SD card on Mac

Ryan picture Ryan · May 26, 2017 · Viewed 10.7k times · Source

How can i install Raspbian OS to my SD card without installing any additional software or application on my Mac. Most of tutorials found on google will require to install SD Formatter or didn't provide detail steps.

Answer

Ryan picture Ryan · May 26, 2017
  1. Download raspbian image from Raspbian website

  2. Extract the zip file

  3. Run df -h on any terminal

$ df -h

Filesystem      Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1     465Gi  278Gi  186Gi    60% 3262771 4291704508    0%   /
devfs          191Ki  191Ki    0Bi   100%     660          0  100%   /dev
map -hosts       0Bi    0Bi    0Bi   100%       0          0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0          0  100%   /home
/dev/disk2s1    60Mi   20Mi   40Mi    34%     512          0  100%   /Volumes/boot

Get disk number from df -h output. In example above X will be 2

  1. Unmount SD card

$ sudo diskutil unmount /dev/diskXs1

  1. Go to download directory and use dd command to format and copy Raspbian image to SD card

$ sudo dd bs=1m if=./2017-04-10-raspbian-jessie.img of=/dev/rdiskX

  1. Eject SD card

$ sudo diskutil eject /dev/rdiskX

  1. Insert SD card to Raspberry PI and start playing with it!