lspci -nnk | grep -iA3 "ethernet"
The command lspci -nnk | grep -iA3 "ethernet" extracts and displays your
system's wired network hardware details, specifically identifying your NIC (network interface card),
hardware IDs, and the Linux kernel driver it is using.
Breakdown
-
lspci: Lists all PCI (Peripherial Component Interconnect) buses and devices attached
to your motherboard (such as GPUs, audio cards, and network adapters).
-
-nn: Along with the textual description, print the numeric [Vendor ID:Device ID]
codes (e.g., [13c5:5178] ).
-
-k: Shows which Kernel driver is handling the device, and which kernel modules are
available for it.
-
| grep -iA3 "ethernet": Pipes the massive list to grep, searches case-insensitively
(-i) for the word "ethernet" (which isolates wired controllers), and prints the matching line
along with 3 lines of context after it (-A3) to ensure you can see the driver details.
If you execute this on a machine with a Broadcom network controller, it will output something like this:
Sample Output
0b:00.0 Network controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5761e Gigabit Ethernet PCI [14E4:1680] (rev 10)
Subsystem: Dell Device [1028:0428]
Kernel Driver in use: tg3
Kernel modules: tg3
Key Points
-
Hardware Info: The vendor name, model name, and revision number/info if it's available.
-
Hardware Ids [14E4:1680]: The first 4 numbers indicate the vendor (14E4 is Broadcom)
and the next 4 represent the hardware chipset/model. If the hardware info isn't
available, an internet search with these will get it.
-
Kernel driver in use: This displays the active driver (like tg3 or e1000e). If this
line is missing from your terminal output,your Linux system has not loaded
a driver for your Ethernet card.
Depending on what you are working on, one of these similar commands may be useful.
Variants
© VdStudioS 2026