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.
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:
To install ethtool on Fedora, CentOS or RedHat:
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.
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:
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:
Permanent address: 9c:8e:99:12:2d:8a
The second method is via lshw, a command-line utility for showing detailed hardware specification of a Linux machine.
To install lshw on CentOS or RedHat, first set up Repoforge repository on your system, and then run:
To install lshw on Fedora, simply run:
To show detailed vendor information of your NIC, run the following.
*-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)
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:
To install lspci on CentOS, Fedora or RedHat:
To find the name of Ethernet card(s) available on your system, run the following.
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.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to install Suricata intrusion detection system on Linux - September 3, 2015
- How to switch from NetworkManager to systemd-networkd on Linux - August 31, 2015
- How to set up a system status page of your infrastructure - August 25, 2015