How to find Ethernet network interface card information in Linux

Sometimes you may want to know the product name or hardware settings of the network interface cards (NICs) attached to your Linux system. For example when you check whether a particular network device driver or a kernel module is compatible with your Ethernet adapter, you need to know its hardware specification such as NIC model/vendor (e.g., Broadcom NetXtreme, Intel I350), speed (e.g., 1GB/s, 10GB/s), link mode (e.g., full/half duplex), etc.

In this tutorial, I will describe how to find Ethernet NIC information from the command line in Linux.

Method One

The first method is to use ethtool, a command-line tool for checking or modifying PCI-based Ethernet card settings.

To install ethtool on Ubuntu or Debian:

$ sudo apt-get install ethtool

To install ethtool on Fedora, CentOS or RedHat:

$ sudo yum install ethtool

To display hardware settings of a network interface card with ethtool, run the following command. The reason for sudo access in this case is to allow ethtool to obtain wake-on-LAN settings and link status.

$ sudo ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: g
        Link detected: yes

To find Ethernet device driver and firmware information:

$ ethtool -i eth0
driver: bnx2
version: 2.1.6
firmware-version: bc 5.2.3 NCSI 2.0.6
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes

To find factory-default MAC address information:

$ ethtool -P eth0
Permanent address: 9c:8e:99:12:2d:8a

Method Two

The second method is via lshw, a command-line utility for showing detailed hardware specification of a Linux machine.

To install lshw on Ubuntu or Debian:

$ sudo apt-get install lshw

To install lshw on CentOS or RedHat, first set up Repoforge repository on your system, and then run:

$ sudo yum install lshw

To install lshw on Fedora, simply run:

$ sudo yum install lshw

To show detailed vendor information of your NIC, run the following.

$ sudo lshw -class network
  *-network
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth0
       version: 20
       serial: d4:85:64:77:f3:54
       size: 1GB/s
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=1.7.5 duplex=full firmware=5.2.3 NCSI 2.0.6 ip=192.168.10.78 latency=0 link=yes multicast=yes port=twisted pair speed=1GB/s
       resources: irq:16 memory:f4000000-f5ffffff memory:e6100000-e610ffff(prefetchable)

Method Three

If all you need to know is the product/vendor name of your Ethernet card, you can use lspci command which displays information about PCI buses and connected PCI devices.

To install lspci on Ubuntu or Debian:

$ sudo apt-get install pciutils

To install lspci on CentOS, Fedora or RedHat:

$ sudo yum install pciutils

To find the name of Ethernet card(s) available on your system, run the following.

$ lspci | grep -i 'ethernet'
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of Xmodulo.com. He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

7 thoughts on “How to find Ethernet network interface card information in Linux

  1. Thanks for the info. Is there a way for me to relate the output of an lshw command ( which shows that I have 4 10Gb ports on eth7,eth9,eth10,eth11 ) to the port's physical location on the system ?

    • If you know what MAC address is assigned to a physical port, you can check the (MAC address, port name) association from /etc/udev/rules/*-persistent-net.rules

      Typically you can view the MAC address of a physical port from BIOS setup.

  2. This is a great little article and extremely helpful as I'm in the process of doing this myself - lshw in particular. However, I would like to know if there is any way of finding out which of the NIC ports are on board and which are external - is there a way to do this?

  3. Hi,
    I have a question about network card information field. What are the meanings of size and capacity?
    I have a D-Link 1Gbps NIC card. It shows size: 10Mbit/s and capacity: 1Gbit/s. Does that mean I can send 1Gb data per second via my D-Link interface? What is the meaning of size: 10Mbit/s?
    Thanks

    • The "capacity" field tells you the maximum bandwidth supported by your NIC. The "size" field indicates the speed of a port your NIC are currently connected to, and this value can vary depending on which router/switch you are connected to, and is always less than or equal to the maximum capacity of your NIC. You are currently connected to a 10Mbit/s port, meaning you cannot use 1Gbit/s bandwidth due to the port limitation.

  4. I was in need to find the driver and firmware of a NIC card and was wondering how to find it. Landed up in your article, read for 3 minutes and the the command ethtool -i eth0 did the trick for me. Just want to say Thank you.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *