— BEGINNERS— How to set up your new Raspberry Pi 4 model B headless

Ian Wu
6 min readDec 28, 2023

Today we are going to download the 32-bit Rasberry Pi OS into the Pi and project its screen on your computer without the need to get a micro HDMI to HDMI adapter/cable, aka accessing your Pi remotely. This can also work on the new Raspberry Pi 5, but I have not tested it out yet. What you need are as follows:

  • A Raspberry Pi
  • A micro SD card
  • micro SD card reader
  • A power cable for the Raspberry Pi
  • Another computer
  • Wifi in your household that you can access

Step One: Download and Install the Raspberry Pi Imager

Go to the link provided above and install the imager on your device. In my case, I am using a Windows computer so I downloaded the Windows version. After the installation process, run it, and plug in your micro SD card with its reader in a spare dock on your computer.

Step Two: Settings of OS Installations onto your Micro SD Card

Since we are accessing the Pi remotely, we need to make some changes to the installation settings. Hit Control+Shift+X on your computer (Command+Shift+X on Mac) and there should be a settings page popping out.

Now, go to the services tab enable SSH, and use password authentication.

What you need to do now is to go back to the general tab and set your username and password that you use later to access the Pi. After that, you enable the Configure wireless LAN option and type in your home Wifi’s SSID and Password, which is the same name as your wifi and the password you need to access it. You can also change your locale settings to match your information if you want to.

Click Save, and you should proceed to select your Pi Device, desired operating system (which is the Raspberry Pi OS 32-bit), and the SD card.

Apply the OS Customization Settings, and start the downloading process.

Click “Yes”
Click Yes

After you complete the downloading, take out the micro SD card, and leave it aside. DO NOT PLUG IT INTO YOUR RASPBERRY PI YET.

Step Three: Download the other necessary applications

Download and install Nmap and RealVNC viewer. Make sure you install RealVNC viewer, not RealVNC Server.

Step Four: Find your Pi on your local internet using Nmap (or use your router)

Now plug the micro SD card into your Raspberry Pi and power the Pi on. On your computer, check what your computer’s IPv4 address is. You can find them in your wifi settings for both Windows and Mac. The format should be XXX.XXX.X.XX. Turn on your Rapsberry Pi and wait for about a minute or two. Now, run the following command in your terminal:

nmap -sn XXX.XXX.X.0/24

replace the last few digits after the last period with 0/24 to allow Nmap to scan through your wifi. In one of the results coming up after it should have:

“Nmap scan report for raspberrypi (XXX.XXX.X.XX):
Host is up.”

The XXX.XXX.X.XX is your Raspberry Pi’s IP, which we would use later. If the IP did not show up, you can wait for an extra few minutes and try a couple more times.

Step Four — Two (If the step above did not work, skip this if it did)

Here is a backup strategy you can use if attempts failed.

Normally a household wifi’s router should be accessible by the owners, in which you can see what devices are connected to your wifi. You can directly find your raspberry pi in there. From here you can find the IP address of your Pi.

Forgive the Chinese haha.

Step Five: SSH into the Pi, and allow remote access

Type in your terminal:

ssh pi@’IP’

Replace the IP with the IP number of your Raspberry Pi. Make sure that it has the single quotation marks. You should see something like this after running this command:

What your terminal should output

Type in your password from what you setted in the “set username and password” section from earlier on.

If the password is incorrect after multiple attempts, restart the entire process, and just set your Username to “Pi” and password to “raspberry” for an easier time to log in. However, this should pop up after you enter the password correctly.

Here you go! You are in the Raspberry Pi’s terminal! There is still more to do before the Pi could be projected on your screen.

Run “sudo raspi-config” in your terminal:

Use your direction keys on your keyboard to navigate, and go to Interface Options in the window:

Hit Enter to go into the options menu

Go into VNC:

And select Yes to allow remote access:

And select “OK” after the terminal runs some processes:

And Finish.

Step Six: Seeing the Pi’s Desktop!

Open up your VNC viewer.

In the VNC server address bar, input raspberrypi.local, and press enter to start connecting.

Enter your username and password, same ones as the “Set username and password” tab from earlier on:

And after a few seconds… you are in!

Thank you for reading this, and if there are parts that I can improve please do not hesitate to write a comment.

--

--