Static ip in Ubuntu

-ifconfig

-vi /etc/network/interfaces

 

and restart eth0 interface