Setting Static IP in Ubuntu Terminal
Open your Ubuntu’s Terminal, then issue the command:
after hitting ENTER key this will ask for your root or admin password; adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# The primary network interface
iface eth0 inet static