

1 interface wlan0 static ip_address = 192.168. interface eth0 static ip_address = 192.168. You’ll need to edit the numbers in the snippet so they match your network configuration. Scroll all the way to the bottom of the file and add one, or both of the following snippets.ĭepending on whether you want to set a static IP address for a wired connection or a wireless connection eth0 = wired, wlan0 = wireless.

Then you need to edit the nf file sudo nano / etc / dhcpcd. The file must contains the following lines: country = GB ctrl_interface = DIR = / var / run / wpa_supplicant GROUP = netdev update_config = 1 network = In order to configure the Wi-Fi connection when starting the Pi, we will create the wpa_nf file in the boot partition.īy typing: sudo nano / etc / wpa_supplicant / wpa_supplicant. Connect the Raspberry Pi to your Wi-Fi router The following is done over SSH as I use the lite version of Rasbian OS lite version, but you could just as well plug your Pi into a monitor, hook up a keyboard and mouse, and use the Terminal instead, if you use the full version of Rasbian OS.

I hope you made a backup, because you’ll need to remove any edits you have made, and revert it back to its original state! I recommend doing this on a fresh install, however if you have attempted to set a static IP address already, you may have found yourself editing the interfaces file (/etc/network/interfaces). Here I will show you how to set a static IP address on your Raspberry Pi Zero W on Raspbian OS. All I have to do is configure a static IP address and my Raspberry Pi Zero W is ready for use. After installing my Raspberry Pi Zero W in my previous blog here.
