Contact About Blog ClaudioBrt

How to set up Raspberry Pi 3 with a Mac: Copying the image file

Using NOOBS is the way to go for beginners, but as you continue using your Raspberry Pi you’ll quickly want to switch to installing the operating system from the image file.

This is smaller than NOOBS, so you get more space to use. It’s also a faster installation and the process works for other operating systems, so you’re not limited to Raspbian any more.

Unlike other computers, you’ll end up re-installing the operating system on a Raspberry Pi far more frequently (it’s designed to be set up, wiped and reused over and over again – it’s a computer for prototyping).

Here’s how to set up a Raspberry Pi 3 B+ with a Mac using Terminal:

Use SD Formatter to format your SD Card. Eject the SD Card and remove it from your Apple Mac.

Open Firefox (any browser will do) and head to and click on Raspbian.

Click Download ZIP under Raspbian Stretch Lite. Double-click the Raspbian zip file in your Downloads folder to extract the image file. Mine is 2018-06-27-raspbian-stretch-lite.img (you may have a later version).

Open Terminal. Enter the following command:

diskutil list
You will see a list of all your drives. If you’re using a Mac with just one hard drive, then two appear: /dev/disk0 and /dev/disk1.
If you have external hard drives, or more volumes, then there will be more drives. Attach the Micro SD Card to your Mac. Enter “disktuil list” again. Check carefully to locate the new disk. It will be one more on from the last list (mine is /dev/disk2) and have (external, physical)” after it.

Check that its SIZE matches the SD Card. It’s important that you get this right so you don't end up overwriting content on the wrong drive. Enter:
sudo diskutil unmountDisk /dev/disk[n](replacing with the number of the disk, ie: /dev/disk2). Enter this carefully:
sudo dd bs=1m if=~/Downloads/2018-06-27-raspbian-stretch-lite.img of=/dev/rdisk[n]
replacing [n] with the number of the disk Tip: you can use tab to expand file paths in Terminal.

and press Tab to get the rest of the filename (you may need to add “img” to the end). The image file will be copied to the SD Card. You won’t get any feedback while it copies unless you press Command + T and it can take several minutes.

Leave Terminal do its thing.

When the copy is finished enter:
sudo diskutil eject /dev/disk[n]
to eject the disk. Remove the SD Card and insert it into your Raspberry Pi 3 B+ . As of the November 2016 release, Raspbian has the SSH server disabled by default so the first thing you will need to do when booting up the Raspberry Pi is to enable SSH.


sudo raspi-config
Select Interfacing Options
Navigate to and select SSH
Choose Yes
Select Ok
Choose Finish

Now lets update the Raspian repository to make sure it’s up to date. First, update your system’s package list by entering the following command:


sudo apt-get update
Next, upgrade all your installed packages to their latest versions with the command:


sudo apt-get upgrade -y