0

This question already has an answer here:

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

marked as duplicate by muru, Mitch Dec 6 '14 at 7:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

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

auto eth0
iface eth0 inet dhcp

to:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
broadcast 192.168.0.255
dns-nameservers 8.8.8.8 8.8.4.4

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
  • @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.