//Display existing network configuration. This will display the network configs for the machine. //Not the lo which is the loopback config. $ netstat -i //edit the /etc/network/interfaces $ sudo vim /etc/network/interfaces //comment out the dhcp setting and add the static setting. iface lo inet loopback #iface eth0 inet dhcp iface eth0 inet static address 192.168.1.4 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 //restart network config $ /etc/init.d/networking restart //set the nameserver(Ubuntu) sudo vim /etc/resolvconf/resolv.conf.d/tail //add the following line nameserver 192.168.1.1 //restart resolv sudo /etc/init.d/resolvconf restart