Ubuntu: Setting default gateway / ip etc

If you want to specify a default gateway or ip address for your Ubuntu installation, try the following steps.

Open SSH and type this command

sudo nano /etc/network/interfaces

You can edit everything there as shown in the screenshot below (click to enlarge)

Ubuntu network interface

auto eth0
iface eth0 inet static
        address 192.168.1.231
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.77
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.253 192.168.1.226
        dns-search nextbridge.org