#sudo ifconfig eth0 192.x.x.x netmask 255.x.x.x (Make sure that you are disconnected from interface)

I hope it helps you