Connecting to Raspberry Pi for first time (headless)

Sasi DattaSasi Datta
3 min read

OK, I wanted to post on Devops related stuff. Instead I am starting with raspberry pi. Well, I have decided to learn Pi related stuff and thought I could use it for Devops related testing.

Which model to buy - Purpose ?

There are different models such as raspberryPi pico, Raspberry Pi Zero & Raspberry Pi Model 4B

Purpose - I want to setup my Linux environment on Pi and experiment out few things. Hence I bought Pi Model 4B which fits my porpoise.

We can select Memory as per our needs. 4 GB should be sufficient.

I bought 8 GB RAM Pi for myself for devops related purpose.

For standard model, we need to purchase Memory card separetely. I got 32 GB card which should be decent enough.

Power connector would be C-type. Usually combo bundles are available for purchase.

Additional HDMI cable can be purchased, incase we are connecting Pi to Monitor.

Take a look at my setup below

sasi.jpg

Where to buy ?

I recommend to buy it from raspberryPi approved resellers. Usually Pis are out of stock due to chip shortage. So email can be provided here to notify when a new stock is added.

https://www.raspberrypi.com/products/

What we need to connect

Headless Mode

We can connect to Pi to HDMI monitor. Instead we are configuring Pi in headless mode with pre-setup.

Setup boot disk for Pi

Insert SD Memory card into Card reader/Adapter and connect to your computer.

Download Rasberry Pi imaging tool from https://www.raspberrypi.com/software/

Select preferred OS

Recommended option would be Rpi 32 bit OS. Feel free to select 64 bit or any other.

image.png

image.png

image.png

image.png

Click on Advanced settings option ( available in latest versions)

Screenshot 2022-10-13 at 5.38.17 PM.jpeg

Can provision ssh enable option, wifi options, login credentials here. Once done , click on WRITE option.

Screenshot 2022-10-13 at 5.07.22 PM.png

Writing in Progress

Screenshot 2022-10-13 at 5.52.25 PM.png

Once, process completed , we get this popup.

Screenshot 2022-10-13 at 6.35.50 PM.png

Connecting to Pi via SSH

Pi can be connected to a LAN or can be connected to Wifi as per pre-configuration.

To connect to the Pi, first we need to figure out IP assigned to Pi. we can utilise nmap to check for Pi address, which would show up as raspberry pi device. Otherwise we can check via bruteforce via telnet.

Screenshot 2022-10-15 at 12.15.07 AM.png

Linux or Mac terminal, connect as below

ssh pi@192.168.0.104

Screenshot 2022-10-15 at 12.35.49 AM.png

If it's windows, Open up Putty and enter Pi IP and port number as 22 and provide login creds as configured. Default cred's would be username: pi/password: raspberry.

If Pi is connected to Wifi, follow Router instructions online for wifi dhcp reservation.

Incase Pi is connected via LAN, Please follow below guide to assign static IP https://www.makeuseof.com/raspberry-pi-set-static-ip

Please feel to to comment if any queries/feedback You can write email to sasidatta@protonmail.com

TwitterID: https://twitter.com/sasidatta

12
Subscribe to my newsletter

Read articles from Sasi Datta directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sasi Datta
Sasi Datta

Hey I am Sasi Datta. I am Senior Devops Engineer with 9 years of experience. Just trying to share knowledge on Devops related subjects. Feel free to reach to me if you have any queries.