Configuring a static IP on HypriotOS for the Raspberry Pi

How you configure a static IP on the Pi changed between Wheezy and Jessie, and it seems on Hypriot’s prebuilt images for running Docker on the Pi, it’s a slight variation.

Edit /etc/network/interfaces.d/eth0, comment out the DHCP line:

iface eth0 inet dhcp

and add:

iface eth0 inet static
address your-static-ip
gateway your-gateway-ip
#google dns servers
domain_name_servers=8.8.8.8, 8.8.4.4

Done!

One Reply to “Configuring a static IP on HypriotOS for the Raspberry Pi”

  1. Thanks Kev,

    Your snippet here saved me digging into man files. Works a treat.

    All I’d add is that using an IP in the 10.42.0.x range means that you can connect the PI to your local Linux/Mac ‘shared’ adapter and it’ll be internet enabled over your Wifi.

    Andy Gumbrecht.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.