Headless Installation of Raspbian OS on Raspberry Pi 3
Welcome to the tutorial on how to do headless Raspberry Pi setup.
The adventurous journey starts when a person buys a Raspberry Pi and hopes to make exciting projects in coming days. Sounds good, but, the excitement diminishes when one gets to know of the installation procedure of the entire Operating System in the tiny, but powerful machine.
Enough of tale now. Let’s get started to headless Raspberry Pi setup. You can also learn about the setup through this full installation video on my Youtube channel.
In this very post, I will guide you through the entire journey of installation of the ready-to-move in setup of Raspbian OS on Pi 3. And the great thing is, all you need is of-course your brand new Pi, with at least 8 GB micro SD card (I would recommend with grade at least Class 6 or Class 10), an Ethernet Cable to connect with an Access Point such as Internet Router, and your PC.
Download the operating system from Raspbian official download page. The downloadable image size varies in size from 1.5 to 2.0 GB depending upon what is the latest version being offered.
Download and install the Win32 Disk Imager Utility (it’s free) from here. Plug in the micro SD card in to your PC and open the utility to select device as your micro SD card drive. Browse the image file to your recently downloaded .img file and click on Write button.
Now, that you have written raspbian image to the micro SD card, you will be having two partitions created in the card. Open one of the partitions, i.e., boot partition and create an empty text file. Name the file as ‘ssh’ with no extension such as .txt, etc. This will enable us to communicate with Pi over ssh. Then, safely remove the memory card from PC.
You will be performing headless Raspberry Pi setup over ssh.
Now, plug in the card in to your fantastic Raspberry Pi and power it on. Don’t forget to connect it with the router using Ethernet cable. Wait for 2 minutes for Raspbian OS to boot up.
Download and install Advanced IP scanner from the link. You may use any other application which helps us know the locally connected devices to the router. Scan for the devices and note the IP address alloted to Pi.
Download and install Putty from here. Quickly create a new configuration by going to Session. Type in the IP address of Raspberry Pi, such as 192.168.1.6 (in my case), into Host Name and Port as 22, Connection Type is SSH. Go to Connection>> SSH>>Auth>> X11 and check in Enable X11 Forwarding. Click again at the Session tab and save the session by typing in name as “RPi” and clicking Save button.
Now, load the RPi3 session. A warning dialog will display to you. Trust the new key by hitting Yes button. Now, the terminal will be asking for username. Type in username as pi and hit Enter. Then, type in password as raspberry and hit Enter. Note that the password won’t be displayed on terminal when you type it. This will log you into the raspberry pi.
Now, issue the following commands one by one to update and upgrade raspberry pi.
sudo apt-get update sudo apt-get upgrade
Also, update the raspberry pi firmware.
Go to the Raspberry Pi configuration tool using command
Go to Advanced Options>> Expand File System and press OK. Finish and Reboot. Wait again for a minute for Pi to boot up. The current ssh connection will be broken. You need to re-establish over Putty client.
After logging in again to Pi using ssh, issue the following command to install remote desktop on Pi.
sudo apt-get install xrdp
This will enable the Pi to be accessed via Windows Remote Desktop Connection. Reboot the Pi once the installation is complete.
Now, open up the Remote Desktop application. Type in the IP address of Pi and click Connect.
You will see prompt for Pi’s username and password. Type in the credentials and log in to the world of wonderful possibilities, your tiny but powerful machine – the Raspberry Pi.
Thanks for reading this post. I hope the content was helpful 🙂