Headless Raspberry Pi

Step 1. Download a lite Raspbian image

Download the Raspbian Lite version (no desktop environment needed for a headless setup).

Step 2. Copy the image to the SD card

Find your SD card from a Linux terminal:

sudo fdisk -l

You'll see something like:

Disk /dev/sdc 14.86 GiB ...

Make sure you select the correct disk. Then write the image (replace /dev/sdX):

sudo dd bs=4M if=2019-07-10-raspbian-buster.img of=/dev/sdX conv=fsync

Step 3. Enable SSH

Create an empty file named ssh in the boot partition to enable SSH on first boot:

touch /run/media/your_username/boot/ssh

The path may differ on your system.

Step 4. Configure WiFi

Create /run/media/your_username/boot/wpa_supplicant.conf:

sudo nano /run/media/your_username/boot/wpa_supplicant.conf

Paste the following (replace country, SSID, and password):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
ap_scan=1
fast_reauth=1
country=DE
network={
  ssid="network SSID"
  psk="network password"
  id_str="0"
  priority=100
}

Step 5. Find your Raspberry Pi on the network

Log into your router and look for new DHCP leases, or scan with nmap:

sudo nmap -sP 192.168.0.0/24

Adjust the subnet to match your network (192.168.1.0/24 is also common).

Step 6. Connect via SSH

ssh pi@192.168.0.150

Default password: raspberry — change it immediately after first login.