Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linux machine with two Ethernet cards both using the Intel e1000 driver. lspci reports different models of Ethernet cards, but I can't tell which is eth0 and which is eth1. Other than turning off the machine and reading the chips, how can I tell which model is eth0 and which is eth1?

share|improve this question

migrated from stackoverflow.com Nov 2 '10 at 21:34

This question came from our site for professional and enthusiast programmers.

5 Answers 5

I haven't tried it myself, but try the ethtool command. With

ethtool -p eth0

you can get the LEDs on the card to blink. You can then easily identify which card is blinking.

share|improve this answer
Check the manpage for details: linux.die.net/man/8/ethtool –  socken23 Nov 2 '10 at 21:44

Parse the output of ifconfig. It will give you the hardware MAC address that you can use to identify which card is which.

share|improve this answer
Is there a mapping somewhere from lspci output to mac address? Unfortunately, I don't have the mac addresses written down. –  User1 Nov 3 '10 at 3:53

Connect only one of the interfaces to a switch then use the output of mii-diag, ethtool or mii-tool (depending on which is installed) to see which has a link. You'll then know which physical card is which interface. The output of dmesg should then help you work out which is which.

share|improve this answer

To relate PCI number with device name, check

ls /sys/net/eth0/driver

this will show PCI number.

share|improve this answer

I know the thread is old, but I think the anwsers missed the point.

To associate the device as listed with ifconfig with the physical device, I do the following:

ethtool -i DEVICE

This will give you the bus-info which you can correlate with the infomation obtained from :


The bus-info should match the numbers at the beginning of the line returned by lspci.

share|improve this answer
This is nice but how do you map the PCI bus number to a physical card? –  pabouk Oct 30 '13 at 12:40
How does this help you to know which one is your left-hand card, and which is the right-hand one? –  MariusMatutiae Oct 30 '13 at 17:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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