0

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

zoro
  • 1

1 Answers1

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
Alex Jones
  • 7,982
  • 9
  • 55
  • 94