Ubuntu: couldn't find IP in eth0



Question:

I have installed Ubuntu 14.04. I started the terminal and hit 'ifconfig' but couldn't find the IP in eth0. I tried a couple of things to remediate it like:

  1. editing '/etc/network/interfaces'
  2. editing '/etc/udev/rules.d/70-persistent-net.rules' followed by 'reboot'

Please help resolving the issue.

Thanks.


Solution:1

As suggested by DevRobot you can look at the output of ifconfig or ip addr to find the current ip address of eth0.

This will work only if eth0 exists and only if it has currently got an ip address.

if eth0 exists but you can not see an IP address then first check that your ethernet is connected, the output of ip addr should show state UP.

Then presuming that your network has a standard home router, you expect to get your ip address over DHCP, which is most likely, then you can try the following command:

sudo dhclient eth0  

Then check your ip with the command ip addr again.

If the dhclient command worked, then this indicates a probable issue with your configuration, I recommend posting your /etc/network/interfaces file so we can check it.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »