For network interface card (NIC) hardware to operate properly, you need a suitable device driver for the NIC hardware. A NIC device driver implements a hardware-independent common interface between the Linux kernel and the NIC, so that packets can be moved between the kernel and the NIC. While some drivers may be statically built in the kernel, most drivers for modern NICs are dynamically loaded as kernel modules.
When you are troubleshooting a NIC hardware problem, one thing you can do is to check whether a correct network adapter driver is installed properly. In this case, you need to know which kernel module is your NIC driver.
There are several ways to find the name/version of an Ethernet card driver on Linux.
The first method is to to check dmesg messages. Since the kernel loads necessary hardware drivers during boot, dmesg output should tell if an Ethernet card driver is installed.
The above output shows that a driver named tg3 is loaded in the kernel.
If you want to know more detail about this driver (e.g., driver version), you can use modinfo command.
If dmesg does not print any information about Ethernet driver, that means no suitable network device driver is available on your system.
The second method is to use the ethtool command. To find out the driver name for an interface eth0, run the following.
Another useful tool for NIC driver information is lshw. Type the following command to get detailed information about available Ethernet card(s) and their driver.
In the lshw output, look for the "capabilities" line, and examine "driver" and "driverversion" in the line.
If no suitable NIC driver is installed on your system, the driver field will remain empty.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A 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!