I recently purchased a Raspberry Pi Zero W (Pi Zero with WiFi/Bluetooth), and I wanted to set it up with just my laptop (I didn't have access to a HDMI cable, keyboard, mouse, etc... Here are the steps I took to set it up.
- Obtain the necessary hardware:
- Raspberry Pi Zero / W
- MicroSD Card (at least 8gb, I used a 64gb one)
- 2x Micro USB cables
- Download Raspbian and flash it on the MicroSD Card
- Remount your SD card, and modify some files to enable USB-Ethernet and SSH
- Navigate to
- Modify the following files:
dtoverlay=dwc2to the bottom of the file, and save it.
cmdline.txt: Modify the existing line in this file and add
rootwait. Note the space in-between the two. It should look similar to this afterwards:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet init=/usr/lib/raspi-config/init_resize.sh. Save it.
- Add a new file called
sshin this directory. This will enable SSH when the raspberry pi boots, so we can log into it!
- Navigate to
- Safely eject the SD card, and put it into your raspberry pi.
- Plug the USB port labeled PWR into a USB power source (any phone charger at 5v and 1.5A should be fine)
- Plug the USB port labeled USB into your PC. Wait up to 90 seconds to make sure the Pi has finished booting.
- Make sure Bonjour is installed, for pi auto-discovery.
- Windows: Download Bonjour and install it.
- OSX: Bonjour comes pre-installed
- Linux: For any debian-based systems (Debian/Kali/Ubuntu/Mint/etc..