In this tutorial, we will learn how to headless setup raspberry Pi without using Keyboard, Mouse, Monitor, or even a USB to serial converter. Firstly, we will see how to install raspberry image on Raspberry Pi using a Raspberry Pi imager. After that, we will enable SSH and Wi-Fi without external using Monitor, mouse, or Keyboard with raspberry pi.
Imagine, you have bought a new Pi board and you do not have Monitor, mouse, or Keyboard? How will you make it work? No worries, we will guide you through this tutorial.
I remember when I purchased the Raspberry Pi first time. I was excited to use it as soon as I received it. When I started to set it up, I came to know that I need an external keyboard, monitor, and mouse. Then, I started searching for a solution to set up raspberry pi without any external components. Because if we use external Keyboard, Mouse, Monitor, it will surely cost us some
This is a step-by-step guide for an easy headless setup for Raspberry Pi without using a keyboard and monitor.
You will require the following equipment for the headless setup of Raspberry Pi.
- Raspberry Pi
- MicroSDHC Card
- USB cable
- Raspberry Pi Imager
- VNC Viewer (RealVNC)
Table of Contents
Install Raspberry Pi OS to a microSD card
We will start by installing Raspberry Pi OS to a microSD card using the Raspberry Pi Imager.
The first step is to head over to the official Raspberry Pi OS website and download Raspberry Pi Imager. We will download the Windows version. You can download the version according to your operating system.
Make sure your system has an SD card reader.
After you click the download button the .exe file will start downloading. Click that file after the download is complete, and install the Raspberry Pi Imager on your system.
Write the OS to microSD card
After the installation is complete, run the Raspberry Pi installer. The following window will open. Here, head over to the operating system section and click ‘Choose OS.’
Select ‘Raspberry Pi OS (32-bit)’ as the operating system.
Now head over to the storage section and click ‘Choose storage.’
Make sure you have your microSD card inserted in your system when you reach this step. Select your microSD card as storage.
By now you should have selected the operating system and the storage as shown below:
Let us move forward. Click the settings icon. This will open the Advanced settings menu.
Tick the boxes as shown below. Here we are setting the hostname and then enabling SSH. For SSH, we have to provide a username and a password. Moreover, we also configure the Wi-Fi and select the wireless LAN country. Now save your options.
Now click the ‘Write’ button.
You will be notified that all your data already present on your microSD card will get deleted. Click ‘Yes’ to continue the process.
Now the writing process will start. It will take a few minutes for the OS to be written and then verified.
After the process is completed you will receive a ‘Write Successful’ notification. Click ‘Continue’.
Now you can remove the microSD card from your system. Insert the microSD card into Raspberry Pi and power it up.
SSH Raspberry Pi with Putty
Now after your Raspberry Pi is connected to your system with the microSD card inserted inside it, let us establish an SSH connection.
We need an application such as putty to establish an SSH connection with Raspberry Pi. We will be using Putty in this tutorial. We will use Putty for Windows. It is a free-to-download SSH client.
Download Putty from this link and install it on your Windows based system.
After downloading and installing Putty. Now type “Putty” in the Windows search bar and run it as an administrator.
After you have downloaded it successfully, open Putty. Enter raspberrypi.local as the host name and leave the port to 22 (default). Now press Open.
If you are using Linux or Mac, you can SSH into Raspberry Pi by using the following command:
Now enter the username and password of Raspberry Pi that we previously set. By default the username is ‘pi’ and the password is ‘raspberry.’ But we have set the password to different in the above steps using raspberry pi imager.
Now our RPi is connected with the command prompt. Let us learn how to enable and connect over VNC next.
Access Raspberry Pi GUI using VNC
We can also access the Desktop or GUI of Raspberry Pi without using a monitor and keyboard. For that purpose, we will use a VNC viewer application.
To access GUI, first, we need to enable a VNC interface option in Raspberry config settings. To enable it, first SSH into raspberry by following the steps mentioned in the last section.
Type the following command in the terminal:
This will open the Raspberry Pi Software Configuration Tool window.
Select ‘Interface Options.’
Inside that, select ‘VNC’ to enable it.
Select ‘Yes’ to enable the VNC Server.
The following notification shows successful enablement of the VNC Server. Click ‘Ok.’
Head over to ‘Finish’ to close the configuration tool window.
Installing and Connecting over VNC
Now download and install the VNC viewer on your system.
After the installation is complete, open the VNC viewer. Go to File > New connection.
The Properties window will open up. Here specify the hostname as ‘raspberrypi.local‘ then click ‘Ok.’
Now click the connection icon to connect successfully.
If you get a warning, just click ‘Continue’ to proceed forward.
Now the authentication window will open up. Enter the username and password. The default username and password are ‘pi’ and ‘raspberry’ respectively. Click ‘Ok.’
The Raspberry Pi desktop will now open up.