Ubuntu 14.04 Server - Set up a static IP address

Assume the new IP is to be 192.168.0.99 on interface eth0 and your nameservers are to be 193.213.112.4 and 130.67.15.198. The following is an example of a nameserver check on a current system:

nmcli -f IP4 dev list | grep DNS
IP4.DNS[1]: 193.213.112.4
IP4.DNS[2]: 130.67.15.198

Now fire up your editor of choice:

sudo vi /etc/network/interfaces

and replace this:

auto eth0
iface eth0 inet dhcp

with this:

auto eth0
iface eth0 inet static
address 192.168.0.99
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
broadcast 192.168.0.255
dns-nameservers 193.213.112.4 130.67.15.198

Reboot and test, eg.:

ping google.com