sudo vi /etc/network/interfaces
Colors after often hiding the text (dark-blue on black), so i turn off syntax higlighting
Use Escape to go to command mode
:syntax off
<ENTER>
The lines for the dhcp enabled eth0 interface will look like this:
auto eth0
iface eth0 inet dhcp
Start editing for eth0
auto eth0
iface eth0 inet static
address 10.0.0.30
network 10.0.0.0
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1
dns-nameservers 10.0.0.50 10.0.0.51
Remember to put dns-nameservers separated by space here instead of in /etc/resolv.conf like some pages recommend because changes will be overwritten by resolvconf (default installed on Ubuntu)