Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to determine the driver used in the network card under Linux

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to determine the driver used by the network card under Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn "how to determine the driver used by the network card under Linux".

1. Whether it is an integrated network card or an independent network card, it must be connected to the PCI bus in some way, so that there must be a code name that can be obtained through the following command:

# lspci | grep Ethernet 02Ethernet controller 00.0 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

The first "02 00.0" is the code name of the device on the PCI bus, which is * * in the whole system.

two。 After getting the PCI code of the network card, we can find its driver in sysfs, as follows:

# cd / sys/bus/pci/drivers # find | grep '02VR 00.0'. / e1000e/0000:02:00.0

3. Through the above command, we can find that the device is under the "e1000e" folder, that is, the driver of the network card is e1000e.

4. In summary, on the Linux system, the command to find the driver being used by the network card is as follows:

# code=$ (lspci | grep Ethernet | head-1 | awk'{print $1}') # find / sys/bus/pci/drivers/ | grep $code | awk-F /'{print $6}'

Or

# find / sys/bus/pci/drivers/ | grep $(lspci | grep Ethernet | head-1 | awk'{print $1}') | awk-F /'{print $6} 'Thank you for reading. The above is the content of "how to determine the driver used in the network card under Linux". After the study of this article, I believe you have a deeper understanding of how to determine the driver used in the network card under Linux. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report