0

I would like to check which driver is being used by the kernel for the eth0 interface.

Is lspci eth0 the correct command ?

4
  • Not really, cause i try this command it does not show me the driver used by the kernel for this device Jun 28, 2020 at 21:29
  • 1
    You tried lspci -k (as mentioned in the answer associated with the first comment)? Jun 28, 2020 at 22:58
  • I hope it's a real device, not for example a virtual interface in a container...
    – A.B
    Jun 29, 2020 at 1:22
  • @GarryJeanPierre what did the command proposed in the other question show when you tried it? Can you check whether you have a /sys/bus/pci/drivers/ directory or not?
    – AdminBee
    Jun 29, 2020 at 8:01

2 Answers 2

1

To identify the driver used by a particular network interface, use ethtool -i <name of interface> as root.

Example on my eno1 interface (new-style naming) on Debian 10:

# ethtool -i eno1
driver: e1000e
version: 3.2.6-k
firmware-version: 0.5-4
expansion-rom-version: 
bus-info: 0000:00:1f.6
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

So, in this case, the driver is e1000e.

0

sudo lspci -v shows the drivers in use for all your PCI(E) devices. sudo is not strictly required but might show more info.

Finding drivers for USB devices is more complicated: Find out which modules are associated with a usb device?

1
  • Thanks for the Answer. but what about which driver is being used by the kernel in order to use the sound card in a linux machine? Jun 29, 2020 at 16:18

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