A complete guide to setting up a Raspberry Pi 3 (RPi) to connect wirelessly. Everything is setup from your laptop, writing to a micro SD card before plugging the card in to the RPi. I'm doing this on an Ubuntu computer. I imagine it is very similar from a Mac.
- Download and unzip the Raspbian Lite operating system (OS). You will now have an img file ready to write somewhere.
- Download, install and run Etcher to write the raw operating system to the SD card. This is by far the easiest / safest way to write the OS to the card. (Note I have no liability for mistakes that may occur with this. Follow the instructions on Etcher's website)
- Open a command window and enter:
1sudo touch /media/xyz/boot/ssh
where xyz is the path to the SD card and main_drive_abc will be some long text. One of these two is not necessary but I don't care which. This writes an empty file to these folders. They enable ssh so the RPi can be connected to using the SSH protocol from your laptop.
- Now to use WiFi you'll need to give the RPi your username and password. This command will open an editor on the file that stores this information:
1sudo nano /media/xyz/main_drive_abc/etc/wpa_supplicant/wpa_supplicant.conf
At the bottom of the file add this:
Now press Ctrl+X to exit. Press "y" to save it as the correct filename.
- Put the SD card in the RPi. Plug in the USB power cable. You are ready to connect from your laptop.
- Find the RPi on your network using the command
sudo arp-scan --localnet
Hopefully there will be an obvious choice. If not, try the following instruction changing the final number in the IP address below with each choice you see in arp-scan's output
- Connect to the RPi with the command (changing 192.168.0.18 for whatever number your RPi is allocated on your network)
The username you are using is pi. The password when prompted is "raspberry"
- It is a huge security whole leaving the password unchanged. Run
This gives you an interactive menu. Change the password, update the system. You now have an operational Raspberry Pi to hack.