The following sections explain the required steps to prepare the PC/Mac and the Raspberry Pi
- Download Raspbian OS image from https://www.raspberrypi.org/downloads/raspbian/
- Burn it to the SD card using DiskImager https://sourceforge.net/projects/win32diskimager/
- Connect the RPi to a monitor, mouse, keyboard, and start the RPi
- From the network icon on the desktop toolbar connect to a WiFi network
- Open Terminal
- Run ifconfig to find the RPi’s IP address
This section will only work if you burned Raspbian onto the SD card, and may not work if you started with Noobs (the OS already burned on the SD card that comes with the RPi)
- Plug the SD card reader into your computer
- Open the cmdline.txt file on the main root of the SD card and append the following
ip=192.168.100.200::192.168.100.1:255.255.255.0:rpi:eth0:off
Where 192.168.100.200
is the IP address, 192.168.100.1
is the network gateway, and 255.255.255.0
is the network mask. You are free to change the IP address to any value as long as you choose one on the same subnet at the you set your computer to in Step 8
-
Plug the SD card back into the RPi, then connect the RPi to your computer using an ethernet cable
-
Right-click the network icon on your computer's toolbar and choose "Network and Sharing Center"
-
From the side menu, choose Change adapter settings
-
Right-click the Ethernet network adapter, and choose Properties
-
In the scroll-down menu, choose Internet Protocol Version 4 (TCP/IPv4) and select Properties
-
Select Use the following IP address, and set the IP to
192.168.100.201
, subnet mask to255.255.255.0
, and default gateway to192.168.100.1
Finally, test the conneciton by opening Windows Command Line and typing in
ping 192.168.100.200
-
Download an SSH client on your Windows machine such as PuTTY (http://www.putty.org/)
-
Type in the PI address of the RPi that you acquired in Step 4 of Running the Raspberry Pi with a monitor or Step 2 of Running Raspberry Pi Headless
- Enter raspberry when asked for the password
- You now have access to the Pi through its terminal P.S. If you get a "refused to connect" message, take the SD card out of the RPi and plug it into your SD reader, then on the main root creat an empty file and call it "ssh" with not format. Plug the SD card back into the RPi and it should work.
Install VNC viewer from https://www.realvnc.com/en/connect/download/viewer/
Once you've established an SSH connection through Putty, type in
sudo apt-get update
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
- Run the following command
sudo raspi-config
- Navigate to Interfacing Options, then scroll down and select VNC > Yes.
- Restart
sudo reboot
- Open VNCViewer on your computer, and type the IP address of the Raspberry Pi that you acquired in Step 4 of Running the Raspberry Pi with a monitor or Step 2 of Running Raspberry Pi Headless followed by port
5900
e.g.192.168.100.200:5900
- Enter the Raspberry Pi’s username and password to access the RPi's desktop