I got a few questions about setting a static IP in Ubuntu JeOS. Here is a short and easy step by step guide!
The network settings are stored in the file /etc/network/interfaces and it’s always a good idea to make a backup first in case something goes wrong.
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
When that is done we can safely edit the original file and can always look back or restore the old setting. Now edit the original file:
sudo nano /etc/network/interfaces
Find the part that says “# The primary netwok interface” and change that (and the following two lines) so it looks like this (change to your desired IP of course!):
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Now save the file and restart the network with the following command:
sudo /etc/init.d/networking restart
Done! Now you’re JeOS should be on a static IP-address!