Setting up your Raspberry Pi (RPi) can be excruciating. I know because I also experienced it. This method can save you a lot of money and make it easier to work on you RPi on the go. There are many articles in the internet about this. But this is the one that has it 'All in one place'.
READ: Read all the Information before starting to do this practically.
1. Installing Raspberry Pi OS to SD card.Go to the RPi official webpage by the link below:
https://www.raspberrypi.com/software/
Scroll down till you find the 'Download' button below.
Click the 'Download' button for your Computer's Operating System.
Install the RPi imager on your Computer.
2. Write the OS into your SD Card.Connect your microSD card to your computer. (You might need to use a SD Card Adapter).
Open RPi installer, and Click 'Choose OS'.:
Click on 'Raspberry Pi OS (32-bit)'/The one on the top.
Click 'Choose Storage' and select your SD Card reader.
DO NOT click "Write" yet.
3. SSH and Wi-Fi EnablingPress Ctrl + Shift + X to bring up the Advanced options menu.
Tick Enable SSH tick boxes in the menu.
Give your RPi a password for SSH.
Also, tick Configure Wifi and type your router's SSID (Name) and Password into the provided spaces.
Change your Wifi Country if it needs adjustments.
Change Locale Settings if desired (It can be done later).
Click SAVE followed by clicking WRITE.
Wait till the OS is written and Verified.
DO NOT plug the microSD into the RPi yet.
4. Install NMap on your computer.Go to the following link, download and install Nmap on your computer:
https://nmap.org/download.html
5. Install VNC Viewer on your computer.Go to the following link, download and install VNC Viewer on your computer:
https://www.realvnc.com/en/connect/download/viewer/
Make sure you install 'VNC Viewer', and NOT 'VNC Server'
6. Insert your microSD card into your RPiAfter verifying the OS, go ahead and get your microSD card from your SD card Adapter, and plug it into your RPi.
Then plug in your RPi into it's power source.
7. Find your RPi's IP Address.Open your computer's terminal window.
I use 'Command Prompt', but you can use terminals such as 'Windows Powershell'.
Open Settings and go to:
Setting > Network and Internet > Wi-Fi > Properties > IPv4
In IPv4, you will find the IP address of your Computer.
It will look like: xxx.xxx.x.x (X's are numbers in reality)
In your terminal, type:
nmap -sn xxx.xxx.x.0/24
Use '0/24' instead of the last number after the last period (decimal point) of your IP, This will run through all the IP Addresses in your router, to find the RPi.
Hit Enter.
You will find your RPi's IP address, if you didn't find it, repeat it after a minute till you find the IP, listed next to an item, 'raspberrypi'.
Note down the IP of your RPi, in this case, it's highlighted, xxx.xxx.x.14 (The X's are still numbers)
8. Get into you PiAfter that use your terminal to get into your RPi's terminal.
Type on your terminal:
ssh pi@'IP'
Use the RPi's IP that you got, instead of 'IP' (xxx.xxx.x.14 is the number that I got, your number can be different.) .
Then you will find a prompt asking for your password.
Type the password that you entered in the RPi Imager for SSH, to get into your Pi.
Hit Enter and:
Voila!
9. View desktop of RPi (Finally!)Launch VNC Viewer on your computer, type your RPi's IP:
Press Enter.
Type in pi for the username and,
Type in your password, it should be raspberry .
But if the password doesn't work, type in your SSH password.
You should now see your Desktop:
It is completely normal if you had an error message now, I got it too!
You might be thinking 'I did all of this for an error!'. But fixing it is relatively simple.
Option 1 (Recommended)
Get onto the RPi terminal using step 8, Then type:
sudo raspi-config
Go to 'Display options' and hit Enter:
Go to 'VNC Resolution', and select and confirm '1280x720' (I don't know why, but that resolution seems to work for everyone):
Go to 'Finish', enter it and it will ask you to reboot. Press Enter, when the pink selector is on 'Yes'.
Now the connection will be interrupted because of the reboot.
Now, try to do step 11.
Step 2 (If step 1 didn't work)
If it didn't work, it's completely normal. I didn't get the desktop too.
Redo step 9, to go to the RPi terminal, if it doesn't work, repeat after a minute.
On the RPi terminal, type:
sudo apt-get install lxsession
After LXSession is installed, type:
sudo reboot
to reboot your RPi.
Now, try to do step 11.
It should work by now and a 'Startup wizard' will appear.
Congratulations!
You finally opened the door to your Raspberry Pi, and it's many wonders.
If you got stuck after any step, please leave a comment.
Thank You for staying till the end.
Comments