© Michael Henzler / Wikimedia Commons / CC BY-SA 4.0, altered with Big Sur background

Headless Raspberry Pi Setup on Mac

How to set up a Raspberry Pi 4 without using a monitor

Paul Bitutsky
2 min readJan 19, 2021

--

Trying to set up your new Raspberry Pi? Don’t have an extra monitor? No problem. This way of setting up your Pi is way cooler anyway. And simple too.

What you will need:

  1. A Raspberry Pi with wifi capabilities, such as the Raspberry Pi 4 Model B.
  2. Power cable for Raspberry Pi (USB-C). Something like this.
  3. A MicroSD card. Recommended size is 8 GB, but you may be able to get away with 4 GB.
  4. If your mac only has USB-C ports, you’ll need a USB-C MicroSD Card Reader or some other way to read/write to then MicroSD card.

Instructions:

  1. Download the Raspberry Pi Imager (link).
  2. Insert your MicroSD card into your mac, using the MicroSD Card Reader/Adapter if needed.
  3. Move the Raspberry Pi Imager to your Applications folder. Open the app. Select the 32-bit Raspberry Pi OS. Select your MicroSD card. Note that installing the Raspberry Pi OS on the SD card will erase everything you have stored on there, so you may want to back up the contents of the MicroSD before installing the OS on there.
  4. Once that’s done, you should still be able to see the MicroSD card drive in finder. It will be called “boot” and should have a lot of files in it. Create a file in the root folder of the SD card called “SSH”, with no file extension. It doesn’t matter what’s in the file, so you can leave it empty. Placing the “SSH” file in there will enable you to connect to the device via SSH.
  5. Now you need to tell the Raspberry Pi how to connect to your wifi network. Create a file in that root folder called wpa_supplicant.conf. Put this text into the file, replacing NETWORK-NAME and NETWORK-PASSWORD with your wifi network’s name and password, respectively.
  6. Eject and remove your SD card from your mac. While your Raspberry Pi is not connected to power, insert the SD card into the Pi.
  7. Connect the Raspberry Pi to power, thus turning it on. Wait about 1–2 minutes for it to boot.
  8. There are a few ways you can check if your Raspberry Pi connected to your wifi network. One way is running the command arp -a in Terminal and looking for something named raspberrypi.lan in the list. Another way is trying to ping the device by running ping raspberrypi.lan. If get bytes back then the device should be reachable.
  9. You can connect to the Raspberry Pi by running ssh pi@raspberrypi.lan. The default password for the username “pi” is “raspberry”.

Bam! You’re done! Congrats and have fun with your new toy!

--

--

Paul Bitutsky

Software Engineer at Google working on the Translate iOS app. Recent graduate of UC Berkeley, majoring in Computer Science and Business.