Tuesday, March 25, 2014

Setup static IP in Ubuntu

sudo vi /etc/network/interfaces


auto eth0  # leave this line alone
#iface eth0 inet dhcp  #comment out this line
iface eth0 inet static
address 192.168.1.199
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

sudo service networking restart

If using Oracle virtualbox, one option to connect to the local router is to set the virtualbox network setting of the guest to Bridged Adapter.

No comments:

Post a Comment