Assign a Static IP Address

To configure your Raspberry Pi with a static IP address, follow these steps:

  1. Open the network interfaces configuration file by running:
sudo nano /etc/network/interfaces
  1. 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>
  1. Save the file and exit.

  2. Restart your Raspberry Pi using the command:

reboot

And just like that, you’re all set!

Happy me! 🌱


Revision #2
Created 17 August 2024 18:40:36 by Tiffanie BOREUX
Updated 16 October 2024 01:56:59 by Tiffanie BOREUX