Simple Raspberry Pi 4 headless setup
This guide is for a simple headless RPI 4 setup (no desktop environment)
Main reference: https://www.raspberrypi.com/documentation/computers/getting-started.html
Step 1 - Install OS to micro SD card
Install Raspberry Pi Imager
Download Raspberry Pi Imager from https://www.raspberrypi.com/software/
Direct link for Windows installer: https://downloads.raspberrypi.org/imager/imager_latest.exe
Create bootable media
Insert micro SD card to computer
Require at least 4GB micro SD card
Run Raspberry Pi Imager
Click Choose device and select Raspberry Pi 4 model from the list.
Next, click Choose OS and select OS to install. Raspberry Pi OS (other) → Raspberry Pi OS Lite (64) . This is the minimal OS with only console interface.
Connect your preferred storage device to your computer. For example, plug a microSD card in using an external or built-in SD card reader. Then, click Choose storage and select your storage device.
Next, click Next.
In a popup, Imager will ask you to apply OS customisation. We strongly recommend configuring your Raspberry Pi via the OS customisation settings. Click the Edit Settings button to open OS customisation.
In General tab, edit the value.
The hostname option defines the hostname your Raspberry Pi broadcasts to the network using mDNS. When you connect your Raspberry Pi to your network, other devices on the network can communicate with your computer using <hostname>.local
or <hostname>.lan
.
The username and password option defines the username and password of the admin user account on your Raspberry Pi.
You can skip wireless LAN as we are going to use Ethernet port
The Services tab includes settings to help you connect to your Raspberry Pi remotely.
Check the box next to Enable SSH. This is important that we can connect to the RPi after boot.
Click Save
Then, click Yes to apply OS customisation settings when you write the image to the storage device.
Finally, respond Yes to the "Are you sure you want to continue?" popup to begin writing data to the storage device.
Wait until the process complete.
Step 2 - Boot from micro SD card
Insert the card to the RPi
Plug Ethernet cable
Plug your power supply into the port marked "POWER IN", "PWR IN", or "PWR"
Wait for a few minutes until the green light activity less busy
Step 3 - Connect to the RPi via SSH
Open command promt on Windows 10 or PuTTY
> ssh username@ip-add
Use the username that you have setup when creating the bootable media. Then enter password.
The tricky bit is to find out the IP of our RPi. You can login to your router to find out. Or use network scan app on mobile Fing.
Step 4 - Install and configure softwares
Once logged in via SSH, you can install & configure software using the command line interface.