I’m helping set up a Programming Club at a local school and we’re using Raspberry Pis. The IT lab doesn’t have spare monitors, so the Pis need to run headless — just power and an Ethernet cable. Each Pi gets a dedicated static IP outside the DHCP scope so it’s always reachable.

Here’s the full setup process.

1. Image the SD Card

From a Mac, identify your SD card and write the Raspbian image.

df -h

Note the disk identifier (e.g. /dev/disk2), then unmount it:

diskutil unmountDisk /dev/disk2

Write the image (replace wheezy-raspbian.img with your actual filename):

sudo dd bs=1m if=wheezy-raspbian.img of=/dev/rdisk2

Using /dev/rdisk2 (raw disk) instead of /dev/disk2 is significantly faster on macOS.

2. Initial Configuration with raspi-config

Boot the Pi and connect via SSH (default credentials: pi / raspberry):

ssh [email protected]

Run the configuration tool:

sudo raspi-config
  • Expand filesystem — fills the SD card partition
  • Enable SSH — confirm it’s on
  • Check for updates — update raspi-config itself

3. Configure a Static IP

Edit the network interfaces file:

sudo nano /etc/network/interfaces

Replace the eth0 section with a static configuration:

iface eth0 inet static
    address 192.168.1.x
    netmask 255.255.255.0
    gateway 192.168.1.1

Save and reboot:

sudo reboot

Reconnect via the new static IP once the Pi comes back up.

4. Install tightvncserver

Install the package:

sudo apt-get install tightvncserver

Run it once to set a VNC password:

tightvncserver

You’ll be prompted to set a password (max 8 characters). To add tightvncserver to startup automatically, use the init.d script from penguintutor.com. Drop the script into /etc/init.d/, make it executable, and register it:

sudo chmod +x /etc/init.d/tightvncserver
sudo update-rc.d tightvncserver defaults

5. Connect via VNC and SSH

From a Mac, open Finder and press Cmd+K, or use Safari/Terminal with:

vnc://[email protected]:5901

macOS Screen Sharing will prompt for the VNC password you set. You should see the Raspberry Pi desktop.

SSH access continues to work as normal:

ssh [email protected]

With this setup, the Pis boot headlessly, come up on their static IPs, and are immediately accessible from any machine on the network — no monitor or keyboard required.