Assign a Static IP Address
To configure your Raspberry Pi with a static IP address, follow these steps:
- Open the network interfaces configuration file by running:
sudo nano /etc/network/interfaces
- Replace the contents of the file with the following settings:
auto eth0
iface eth0 inet static
address <YOUR_IP_ADDRESS>
netmask 255.255.255.0
gateway <YOUR_GATEWAY>
dns-nameservers <YOUR_DNS_SEPARATED_BY_A_SPACE>
-
Save the file and exit.
-
Restart your Raspberry Pi using the command:
reboot
And just like that, you’re all set!
Happy me! 🌱
No Comments