Setting a Static IP Address on Your Pi
To perform the following steps, you'll need to have a USB keyboard plugged into your Pi and the Pi plugged into a TV or monitor.
1. Wait for the Pi to fully boot up and take note of the IP address after "My IP address is". If you don't see this line, you can use the ifconfig command after logging in to find the IP address (it will be labeled as "inet").
2. Log in using pi as the username and raspberry as the password.
3. Type this command: sudo pico /etc/network/interfaces and hit Enter.
4. Delete the contents of the document that appears and enter the following:
address 192.168.1.97 <<< NOTE: This IP address should start with the first three octets of the IP that you noted in the first step (e.g. 192.168.1, 10.0.0, etc.), followed by .97.
address 192.168.1.96 <<< NOTE: This IP address should start with the first three octets of the IP that you noted in the first step (e.g. 192.168.1, 10.0.0, etc.), followed by .96.
5. Press Ctrl + O to save and then press Ctrl + X to close the document.
6. Type sudo systemctl disable dhcpcd and hit Enter.
7. Type sudo systemctl enable networking and hit Enter.
6. Reboot the Pi by typing sudo reboot and hitting Enter.
Your Pi should now have a static IP address. You can double-check this when the Pi boots up again by making sure the IP ends in .97 or .96 (depending on if you're using Wi-Fi or Ethernet).