9 min read
Raspberry Pi Os: Installation & Initial Setup
Welcome to the ultimate setup guide for Raspberry Pi OS. Whether you are a beginner or looking to refine your workflow, this document covers everything from flashing the operating system to establishing remote access. You will learn how to perform a headless installation, find your device on the network using Angry IP Scanner, manage remote desktop connections with VNC, and configure a fallback hotspot for reliable access on the go.
Downloading Raspberry Pi Os
Download the latest Raspberry Pi OS from the official website:
-
Official Link: https://www.raspberrypi.com/software/
Note
The OS was previously called "Raspbian", but the official name is now Raspberry Pi OS.
Installation Methods
You have two main options to flash the OS onto your SD card:
A. Using Raspberry Pi Imager (recommended)
Raspberry Pi provides an easy tool, Raspberry Pi Imager, which can download and flash the OS automatically.
Option 1: Install via Repository (Easiest)
-
On Ubuntu/Debian:
bash sudo apt install rpi-imager -
On Fedora:
bash sudo dnf install rpi-imager
Option 2: Manual Installation (.deb Package) If you prefer downloading the package manually:
-
Download the
.debfile from the official website. -
Open your terminal in the Downloads folder:
bash cd $HOME/Downloads/ -
Install it:
bash sudo dpkg -i imager_*.deb sudo apt-get install -f # Fix dependencies if needed
B. Manual Installation (iso)
Alternatively, you can install the OS manually by downloading the image and using a tool like Rufus or any other imaging tool to burn it onto the SD card.
Preparing the Sd Card
When using the Raspberry Pi Imager, after selecting your OS and the target SD card, open the Settings menu (Gear Icon) to configure the system before flashing. This is crucial for a "Headless" setup.
Configuration Settings:
-
General Settings:
-
Set hostname: Give your Pi a unique name.
-
Set username and password: Essential for security.
-
Configure Wireless LAN: (Very Important) Enter your Wi-Fi SSID and Password so the Pi connects automatically.
-
Additional general settings are optional but recommended.
-
-
Services:
- Enable SSH: Check this box to allow remote access via command line.
Save the settings and start the installation (Write/Flash).
First Boot & Ssh Access
After powering on the Raspberry Pi, you can connect to it via SSH using the terminal:
ssh username@hostname.local(Replace username and hostname with what you configured).
Finding Raspberry Pi Ip Address (troubleshooting)
If you don't know the IP address or hostname.local doesn't work, you can use Angry IP Scanner.
1. Download: https://angryip.org/download/#linux
2. Prerequisites (Java): Angry IP Scanner requires Java (OpenJDK 11 or later).
-
On Fedora/RedHat:
bash sudo dnf install java-21-openjdk-devel -
On Ubuntu/Debian:
bash sudo apt install openjdk-21-jdk -
On Arch Linux:
bash sudo pacman -S jdk11-openjdk(Verify installation with
java -version).
3. Installing Angry IP Scanner:
-
For Ubuntu/Debian (.deb):
bash cd $HOME/Downloads/ sudo dpkg -i ipscan_*.deb sudo apt-get install -f # Fix dependencies -
For fedora/redhat (.rpm):
bash cd $HOME/Downloads/ sudo rpm -i ipscan_*.deb -
Running the Executable Jar: If you use the Jar version, run:
java -jar <jar-file>. (Note: You may need theswt.jarfrom the Eclipse SWT Project in your classpath).
4. Scanning the Network:
-
Open Angry IP Scanner (
ipscanin terminal). -
Tip: Sort results by Ping.
-
Locate your Raspberry Pi and use its IP to connect.
-
Note for 32-bit ARM users: You might need an older 32-bit build of SWT.
Connecting with Gui (vnc)
If you want to access your Raspberry Pi using a graphical desktop, you can use VNC (Virtual Network Computing).
Choosing a Vnc Viewer: Tigervnc vs. Realvnc
| Feature | TigerVNC | RealVNC Viewer |
|---|---|---|
| Type | Open-source | Proprietary (Free for personal use) |
| Interface | Utilitarian, functional | User-friendly, polished |
| Best For | Performance, Linux purists | Ease of use, beginners |
Step 1: Install a Vnc Viewer on Your Pc
Option A: Install Tigervnc (open Source)
-
On Fedora:
sudo dnf install tigervnc -
On Ubuntu:
sudo apt install tigervnc-standalone-server tigervnc-viewer -
To Run: Type
vncviewerortigervncin the terminal.
Option B: Install Realvnc Viewer (user Friendly)
-
Download from: https://www.realvnc.com/en/connect/download/viewer/linux/
-
On Ubuntu/Debian:
bash sudo dpkg -i VNC-Viewer-*-Linux-x64.deb sudo apt-get install -f -
On Fedora/RedHat:
bash sudo rpm -ivh VNC-Viewer-*-Linux.rpm
Step 2: Enable Vnc on the Raspberry Pi
Connect to your Pi via terminal/SSH and run:
sudo raspi-configFollow this exact order to enable it correctly:
-
Enable Desktop Auto-Login:
-
Go to System Options -> Boot / Auto Login.
-
Select Desktop Autologin (Desktop GUI).
-
(This ensures the desktop environment loads so VNC can see it).
-
-
Enable VNC Server:
-
Go to Interface Options -> VNC.
-
Select Yes (Enable).
-
-
Finish & Reboot.
Step 3: Connect Through Vnc Viewer
-
Open your VNC Viewer.
-
Enter the IP address of your Raspberry Pi.
-
Enter your Raspberry Pi username and password.
-
You now have full GUI access.
Remote Access Via Web (raspberry Pi Connect)
Raspberry Pi Connect allows you to access your device's desktop directly from a web browser anywhere, without needing to configure port forwarding or VNC.
Step 1: Install Raspberry Pi Connect Service
On your Raspberry Pi terminal, run:
sudo apt install rpi-connectStep 2: Generate Verification Link
Start the sign-in process:
# if it not enable enabel it at first
rpi-connect on
# and after that
rpi-connect signinStep 3: Link Your Device
-
The terminal will generate a unique verification URL.
-
Copy this link and paste it into a web browser on your computer.
-
Sign in with your Raspberry Pi ID (or create one) to link the device.
-
Once linked, access your Pi remotely via the web dashboard.
Network Fallback: Creating a Wireless Hotspot
If you need to move your Raspberry Pi to a new location where the configured Wi-Fi is unavailable (e.g., from home to work), you can configure the Pi to broadcast its own Hotspot as a backup.
Steps to Configure (via Gui/vnc):
-
Create the Hotspot:
-
Click the Network Icon in the system tray (top right).
-
Select Advanced Options -> Create Wireless Hotspot.
-
Follow the prompts to create a normal hotspot.
-
Connect Laptop: Connect your laptop to this new Hotspot network.
-
Find Gateway IP: Open Angry IP Scanner (or check your connection details). The Gateway IP address you see is the IP address of your Raspberry Pi. Use this IP to connect via SSH or VNC.
-
-
Make it Persistent (Fallback Mode):
-
By default, the hotspot might not restart automatically after a reboot. To fix this:
-
Go back to Advanced Options -> Edit Connections.
-
Double-click on the hotspot profile you just created.
-
Go to the General tab.
-
Check the box for Connect automatically with priority.
-
Set the Priority to
0.
-
-
Switch to Local Wi-Fi:
-
Once connected to the Pi via the Hotspot, you can connect it to the new location's internet.
-
Click the Network Icon.
-
Select the local Wi-Fi network (or choose Connect to Hidden Wireless Network if applicable).
-
Since the Hotspot has priority 0, the Pi will prefer this new connection next time it boots if available.
-
Why Set Priority to 0?
This tells the Raspberry Pi to search for your known Wi-Fi networks (which have a higher default priority) first. If it cannot find them (because you changed location), it will fall back to Priority 0, start the Hotspot, and allow you to connect to it directly to reconfigure your settings.
Connect Over Ethernet (internet Sharing)
If you don't have Wi-Fi, you can connect the Raspberry Pi directly to your laptop via an Ethernet cable and share your laptop's internet connection.
Step 1: Configure Your Laptop (linux)
-
Go to Settings -> Network.
-
Find the Wired connection section and click the + (plus) icon to add a new profile.
-
Identity Tab: Give it a name (e.g., "Shared RPi").
-
IPv4 Tab:
-
Change "IPv4 Method" to Shared to other computers.
-
(This allows your laptop to act as a router for the Pi, giving it an IP address and internet access).
-
-
Save/Apply the settings.
Step 2: Connect and Find Ip
-
Connect the Raspberry Pi to your laptop using an Ethernet cable.
-
The Pi should now have an internet connection bridged from your laptop.
-
To find the Pi's IP address:
-
Open Angry IP Scanner.
-
Select your Ethernet interface in the preferences (or scan the local range).
-
Look for the Pi's hostname.
-
-
Alternatively, try connecting directly via SSH:
bash ssh username@hostname.local
Connect to Raspberry Pi From Different Wifi Networks (using Tailscale)
Access your Raspberry Pi securely from any network without needing port‑forwarding, static IP, or router access.
Step 1 Install Tailscale on Raspberry Pi
Open terminal on the Raspberry Pi and run:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale upIt will generate a login link → open it and sign in using Google / GitHub.
🔥 Make sure you use the same account on both Raspberry Pi and your laptop/phone.
Step 2 Install Tailscale on Your Laptop / Pc
Run the same commands on your laptop (Linux/macOS). On Windows, simply download the Tailscale app and sign in.
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale upStep 3 Get Your Private Tailscale Ip
On Raspberry Pi:
tailscale ipOn Laptop/PC:
tailscale statusYou will get an IP like:
100.x.x.xThis is your secure private network address.
Step 4 Connect Via Ssh
From your laptop:
ssh pi@100.xxx.xxx.xxxDefault user (if not changed):
username: pi
password: raspberry🔐 If you changed the username or enabled passwordless SSH, use your configuration instead.
Useful Commands
View devices connected to your Tailnet:
tailscale statusDisconnect (logout):
sudo tailscale logoutStop & Disable Tailscale:
sudo systemctl disable --now tailscaledStart Tailscale:
sudo systemctl start tailscaled.serviceNotes & Tips
-
Works behind NAT/CGNAT — no router setup needed
-
Fully encrypted peer‑to‑peer connection
-
Works on Windows • Linux • macOS • Android • iOS
-
Can also be used for VNC / Remote Desktop / File Transfer
Comments
Loading the discussion…