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?


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.

| improve this answer | |

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

| 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
  • This is useful when the MAC address is written on a sticker on (an accessible place of) the card. – pabouk Aug 19 '15 at 13:34

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.

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

| improve this answer | |
  • 1
    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
  • @pabouk you can use lspci -nn, which shows the PCI number at the end, like (1234:abcd) – zymhan Aug 18 '15 at 21:42
  • 1
    @WildVelociraptor: This option will show PCI vendor and device codes. My point was: The tools will show you the bus code and device code but anyway you will need a documentation for your computer describing where are the particular buses physically located. – pabouk Aug 19 '15 at 13:31
  • @pabouk Ah okay, I understand. Yeah unfortunately I don't think there is a standard numbering convention for PCI slots, and it seems dependent on how many "integrated" components you have that are connected to the PCI bus. Which unfortunately means that there's no real way for Linux or additional software to know the physical layout of your board, barring some sort of ascii-art generator of your mobo layout based on some sort of JSON configuration file.....this gives me an idea. – zymhan Aug 20 '15 at 13:16

To relate PCI number with device name, check

ls /sys/net/eth0/driver

this will show PCI number.

| improve this answer | |
  • lspci -nn is a much easier alternative to this, if you have it available. – zymhan Aug 18 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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