Change Ubuntu IP

  • sudo nano /etc/network/interfaces
change iface eth0 (or whatever the adapter is) from dhcp to static (just replace the word dhcp to static tab indent all of the following type address [IP] type netmask [your subnet mask] network [your network, use zeros for avaiable IPs on the network] broadcast [broadcast IP] gateway [your gateway] dns-nameservers
  • crtl+x
  • yes
  • enter
Example: address netmask network broadcast gateway dns-nameservers