How to reconnect to Ethernet interface on Linux computer?

How to reconnect to Ethernet interface on Linux computer?

  • I am working with a small Linux computer that has an Ethernet interface on it. Typically it has the lo "Local Loopback" interface on it & the eth0 "Ethernet" interface on it that does all of its Ethernet handling. However, when I have ran the ifconfig command on it, my computer only recognized the lo interface on it and can't find its eth0 interface. My Ethernet interface is built into the computer, so I don't think its an issue of hardware failing. Is their some Linux command to rerecognize or scan for the Ethernet interface and try to find it?

  • Answer:

    One does not usually connect to the interface, but connect through it. For user-level stuff, /dev/ethX must to be allocated an IP address, either through DHCP (as from your router or firewall), or manually configured through the admin interface.

user1207381 at Super User Visit the source

Was this solution helpful to you?

Other answers

/etc/init.d/network start or dhclient eth0 or a simple reboot?

ZaB

You can check your interface existence with ifconfig -a or ls /sys/class/net/ethX If the device does not exist, maybe your kernel is not configured.

dien

I believe the ifconfig command only displays active network adapters (ones that are up) unless you use the -a option as @dien illustrates. This command always displays all of them: ip link show Probably the interface failed to get a DHCP address from a DHCP server. Try ifup eth0, or as @ZaB suggests, dhclient eth0 -v (the -v will display diagnostic information). If something is wrong with your DHCP and you need to set a static address temporarily, do ifconfig eth0 up {ip_address} netmask {subnet_mask} - modify /etc/resolv.conf to set your DNS servers - all this is overwritten the next time dhclient eth0 -v works. If ip link show doesn't show an eth0 you might check in the BIOS to see if your onboard ethernet is disabled, or possibly something is wrong with the configuration of your kernel.

ultrasawblade

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.