Most of the time when I setup a Raspberry Pi, I’m running them as a “Headless” system. Embedded useful projects inside, or waiting for me in a box somewhere patiently waiting for me to gain a new idea for a project. All waiting to be readily accessible through the command line without a GUI. This seems like a complicated daunting task in terms of setup for many people. But I’m here to tell you it’s not it’s quite easy and simple actually.
Hardware Requirements:
- A Raspberry Pi (Any version with Built-in Wi-Fi capabilities)
- A power source
- A microSD card (at least 8GB)
- A Micro SD card Adapter
Installing the Operating System:
For installing an operating system for your raspberry pi I recommend you make use of the Raspberry Pi Imager for that task. And after you install the imager. Make sure you have your micro SD and Micro SD card Adapter on hand because you are going to need it to complete this section:
Completed following steps:
- After installing the Raspberry Pi Imager and opening it up. And insert your micro SD card into your pc with the adapter and click on “CHOOSE OS”. I recommend choosing the Lite version of the Raspbian OS. But you can pick any OS you like.
2. Choose your inserted Micro SD card.
3. Now before you write to the disk. You need to take a look at the “Advance Options” menu. To activate this menu you need to press “CTRL + SHIFT + X”. This menu allows for the customization of the OS to meet the needs of the user. Before they write to the micro SD card.
In the Advanced Options menu we can change:
- Overscan, to remove borders from our screen.
- Hostname, identify your Pi on a network.
- SSH on boot, useful for “headless” and remote projects.
- WiFi, setup your WiFi without editing a config file.
- Locale, set your language and location.
Set your host name, I set it as “headless” you can set it to what ever you want. Enable SSH and set your password make sure its something that you remember. Then scroll down to configure the Wi-Fi settings to match your given location, keyboard settings, and Wi-Fi password.
Now Click “Save” and move on to the next step.
4. Now click “write” to disk. You will be prompted with a warning tell you that “All existing Generic Mass-Storage USB Device will be erased”. So make sure before you write to the micro SD card. Make sure there is nothing on the micro SD card you don’t mind losing or make sure it is empty. If all those boxes are checked off click “YES”.
After you click “YES” wait for it to complete and click continue and exit out and remove your Micro SD card.
Finding the Raspberry Pi:
Insert your micro SD card into your Pi. And grab your power source and plug it up to your pi into an outlet or whatever energy you have. And wait for a minute or so and move on to the next step:
Now to find the IP address of your raspberry pi the simplest way to do that is to go into your Wi-Fi router’s settings. And the first thing that you need to do is to find your router’s IP address, type “cmd” in the Windows search bar and press Enter to open the command prompt. Type “ipconfig” in the command prompt and press Enter to run the command. Scroll through the information until you see a setting for “Default Gateway” under the Ethernet adapter or Wireless LAN adapter. That’s your router, and the number next to it is your router’s IP address. Remember that address and close the window when done if wanted.
Type that address into your browser. Now you should see a prompt for you to login. If you don’t know the username/password. Look up the default password for your router model or try (“username: admin, password: admin”).
if you are still having trouble finding your router’s settings username and password. please refer to this link . Now after you have the correct username and password click “LOGIN”.
Now Go to “Devices”. From the Online Devices list. In this section you can view the connected devices information such as their IP address, name, and MAC address.
After you find you find the address take a note of it and move on to the next step!
SSH into the Headless Raspberry pi:
To SSH into the raspberry pi type “cmd” again in the Windows search bar. And press Enter to open the command prompt If you closed it. Now you have to type “ssh pi@<ip_address>” and Follow the steps.
But before you hit the finish line it’s important that you update and upgrade your pi. Type this command in your command line “sudo apt-get update && sudo apt-get upgrade” and hit Enter. And type “y” when prompted on if you want to continue.