0

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

Is lspci eth0 the correct command ?

user1794469
  • 3,909
  • 1
  • 23
  • 42
  • Not really, cause i try this command it does not show me the driver used by the kernel for this device – Garry Jean Pierre Jun 28 '20 at 21:29
  • 1
    You tried `lspci -k` (as mentioned in the answer associated with the first comment)? – Andy Dalton Jun 28 '20 at 22:58
  • I hope it's a real device, not for example a virtual interface in a container... – A.B Jun 29 '20 at 01:22
  • @GarryJeanPierre what did the command proposed in the [other question](https://unix.stackexchange.com/a/41819/377345) show when you tried it? Can you check whether you have a `/sys/bus/pci/drivers/` directory or not? – AdminBee Jun 29 '20 at 08:01

2 Answers2

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.

telcoM
  • 87,318
  • 3
  • 112
  • 232
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?

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64