linux 查看网卡型号(grep -A 1 用法)

需要grep -A 1显示多一行,否则显示一行只能看到芯片组型号

lspci -v | grep Ethernet -A 1
3b:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
	Subsystem: Mellanox Technologies ConnectX®-5 EN network interface card, 10/25GbE dual-port SFP28, PCIe3.0 x8, tall bracket ; MCX512A-ACAT
--
3b:00.1 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
	Subsystem: Mellanox Technologies ConnectX®-5 EN network interface card, 10/25GbE dual-port SFP28, PCIe3.0 x8, tall bracket ; MCX512A-ACAT
--
60:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 1GbE (rev 09)
	DeviceName: Intel Ethernet X722 #1
	Subsystem: Super Micro Computer Inc Device 37d1
--
60:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 1GbE (rev 09)
	DeviceName: Intel Ethernet X722 #2
	Subsystem: Super Micro Computer Inc Device 37d1

参考:
https://www.logicweb.com/knowledgebase/linux/find-nic-model-number-driver-and-firmware-information-in-linux/#:~:text=Find the Model Number of Network Card in,run following command%3A lspci | grep -i “Ethernet”

posted @ 2022-10-21 17:46  小黑狐狸1001  阅读(1097)  评论(0编辑  收藏  举报