I am using ubuntu 14.04 system. Please anyone can tell me how to set static IP address on my system.


command line way:
To set a static IP edit /etc/network/interfaces and change the following:

auto eth0
iface eth0 inet dhcp


# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

Obviously, you will want to change eth0 to whatever your network card is called (hint: ifconfig) and change your IP address, gateway, dns-nameservers to whatever you want them to be. Now, if you want your DNS to come from your ISP then don't set any and it will work fine.

Finally, restart your ethernet:

sudo service networking restart
sudo ifdown eth0
sudo ifup eth0

Graphical way:
open system settings > network > Wired > Options
it will look like this:
network settings IPv4 ubuntu

  • set Method to Manual
  • click Add under Address and fill various fields.
  • Set DNS if you know if, leave blank if want it from your ISP. save
  • plug-in your ethernet cable
  • check your ethernet is working or not by ping google.com if you are getting output then success
| improve this answer | |
  • @zoro if it helped you so accept it – Edward Torvalds Dec 15 '14 at 15:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.