Setting a Fixed IP address

Home Forums Single board computers Raspberry Pi Setting a Fixed IP address

This topic contains 0 replies, has 1 voice, and was last updated by  PMB 6 years, 4 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #1834


    To begin with the R-Pi gets it’s IP address via DHCP, so it can vary. Changing to fixed IP is very similar to the way it’s done in Ubuntu.

    To change to static IP address:

    sudo nano /etc/network/ interfaces

    replace line “iface eth0 inet dhcp” with:

    iface eth0 inet static

    Check also that nameserver points to your gateway or ISP nameserver:

    sudo nano /etc/resolv.conf

    You can restart the network interface but it’s easier just to reboot:

    sudo reboot

    Wait a bit for the reboot then log in and check the new config:


    NOTE: nano is my preferred editor. I also use mc for quick simple file management.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.