RASPBERRY PI SETUP
INTRODUCTION
Step 1: Flash Ubuntu Server 22.04.5 LTS to the microSD Card
Download Raspberry Pi Imager from
Raspberry Pi OS – Raspberry Pi Insert your microSD card via USB card reader in your PC.
In Raspberry Pi Imager:
Choose the Raspberry Pi Device: Raspberry Pi 4
Choose OS: Other general-purpose OS → Ubuntu → Ubuntu Server 22.04.5 LTS (64-bit)
Choose storage: Your microSD card
The above steps are as shown below:
Click on Edit Settings
The following will appear:
On General:
Check Set hostname and type your hostname as desired.
Check Set username and password
Enter:
Username: your username
Password: your password
Check Configure wireless LAN
Enter:
SSID: your Wi-Fi name
Password: your Wi-Fi password
Wireless LAN country: KE for Kenya
Then Click Save
It is recommended to use your mobile hotspot throughout the whole process, input its details as shown above.
On Services:
Check Enable SSH
Choose Use password authentication
Then Click Save
The above process is as shown below:
❌ Don’t edit the options section.
After the above steps the following will pop up:
Step 2: Boot and Connect
Insert the microSD into the Pi and power it up.
Wait about 1–2 minutes for it to boot and connect to Wi-Fi.
Step 3: Find Your Pi’s IP Address
Your Laptop should be connected to the same Wi-Fi or Mobile Hotspot you used to set up Raspberry Pi in Step 1 above.
Option A: Try this in Windows Terminal:
ssh username@username.local
Keep trying until you find the Pi's IP Address
Option B: Using Linux Terminal and Windows PowerShell Tools
Determine your IP Range
On your laptop, open Windows PowerShell and run:
ipconfig
You’ll see something like this:
Look under Wireless LAN adapter Wi-Fi:
Note your IPv4 Address (e.g.,
192.168.152.72)Note the Default Gateway (e.g.,
192.168.152.89)
This tells you the subnet range is likely192.168.152.0/24
Scan for the Raspberry Pi IP.
In your Linux terminal, install Nmap if it’s not already installed.
sudo apt update sudo apt install nmap
Scan the network for active devices. Run:
nmap -sn 192.168.152.0/24 #Modify the subnet range to match your subnet rangeThis scans the entire subnet for live devices. Look for unfamiliar IPs (you’ll likely see only 2, one for your laptop the other for the Raspberry Pi since it’s a mobile hotspot).
You might see something like this:
Try SSH-ing Into Detected IPs
Attempt to SSH into each IP you found.
ssh username@<IP-Address> #Replace with your username and the respective IP address
If connection is refused, try the next IP.
If it’s the correct one, you'll see a prompt like:
The authenticity of host '<IP>' can't be established. ECDSA key fingerprint is ... Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type Yes to continue
Then enter the password you had set on the very first step.
Option C:Using Angry IP scanner and PuTTY
To get the IP address of the Raspberry Pi 4 download Angry IP scanner application from
Angry IP Scanner - Download for Windows, Mac or Linux then choose your respective operating system.
Download the PuTTY application to enable you access the Raspberry pi 4 from Download PuTTY - a free SSH and telnet client for Windows.
Click on the start button to run the application. After 100% scanning Click the ping section and sort by ping.
From the MAC vendor section you will see the Raspberry mentioned. That will be the IP address of the raspberry pi 4.
Open the PuTTY application and key in the IP address:
Open then enter the username that you will log in as.
Input your password that you had input when installing the software in the micro SD card.
Congratulations! You’re now connected to the Pi.
Step 4: Update the System
Once connected via SSH, run the following in the Command Prompt
sudo apt update
sudo apt upgrade
Type y when prompted.
You’ll see a Window like this when the installation is done:
Reboot your pi’s system by unplugging the power cable and plugging it back in. Wait for 1 to 2 minutes for the system to boot.
ssh into it again using:
ssh username@<IP-Address> #Replace with your username and the respective IP address
You’ll see something similar to this:
You’re Done!
Now your Raspberry Pi is ready for:
Installing ROS 2 or other packages
To shutdown the Raspberry Pi run the following command on the terminal:
sudo shutdown -hAlways shutdown the OS before powering it off.
References
Install Ubuntu Server 22.04 on Raspberry Pi
Comments
Post a Comment