Skip to content
Home » static ip

static ip

Visit Tacticalware.com for information related to this tag and others. We look forward to assisting in your tech projects with our in-depth knowledgebase…

SET A STATIC IP ON YOUR RASPBERRY PI 4

This guide assumes that you are running the latest version of Raspbian on your Pi. If you are not, you can follow this guide to get it setup.

How to install Raspbian on your Raspberry Pi 4
https://tacticalware.com/wp-admin/post.php?post=1240&action=edit

My build also uses a FAST M.2 drive instead of the slow Micro SD card:
https://tacticalware.com/boot-raspberry-pi-4-from-m-2-usb-drive/

Now that we have both those straightened out, to set a static IP is simple. Just perform the following:

Open a Terminal
Type:
sudo bash
nano /etc/dhcpcd.conf
Replace hostname with the name of the Pi, I set mine to tacticalware1
Then you will want to
uncomment the following lines and set your address(to uncomment, remove the # from the beginning of them)
#interface eth0
#static ip_address line and set the ip
#static routers line and set it
#static domain_name_servers line and set it
Note that if your local network is 192.168.1.xxx or 192.168.0.xxx use an ip scheme that matches your setup
Ctrl x to save
y
Press Enter
nano /etc/hostname
Make sure you set it to tacticalware1 or whatever your pi’s name is
ctrl x
y
nano /etc/hosts
make sure tacticalware1 is listed in there as well at the bottom of the file, next to 127.0.0.1
ctrl x to save
reboot

Your system will now reboot and your static ip address will now be in effect.

Hardware that I used:
Raspberry Pi 4 (4gb)
https://amzn.to/3q551IO

SanDisk 32GB Ultra microSDHC UHS-I Memory Card with Adapter
https://amzn.to/2Vfvo0y

CanaKit 3.5A Raspberry Pi 4 Power Supply (USB-C)
https://amzn.to/3fNTYPu

CanaKit Raspberry Pi 4 Micro HDMI Cable – 6 Feet
https://amzn.to/33u5hr9

Western Digital 500GB WD_Black SN750 NVMe
https://amzn.to/3nZ5pH4

Plugable USB C to M.2 NVMe Tool-free Enclosure
https://amzn.to/3lflV3L

Thanks for reading…….