Home > Operation and Maintenance > CentOS > What should I do if centos does not recognize the network card?

What should I do if centos does not recognize the network card?

王林
Release: 2020-05-20 13:54:32
Original
4304 people have browsed it

What should I do if centos does not recognize the network card?

Problem recovery:

Enter the ifconfig command in the terminal and find that only one lo loopback network interface can be seen, and there is no eth0 network card. After analysis, it was determined that there is no corresponding network card driver.

Solution:

1. Execute the following command to find your own network card driver (Ethernet controller), then find the corresponding driver online and download the source code.

lspci | grep -i ethernet
Copy after login

The source code is written in C. At this time, the system does not have a gcc compiler, and it cannot be downloaded online. At this time, you need to use the iso image used during CentOS installation. The installation image contains gcc. .

2. One method is to extract the rpm packages required for gcc installation from the package folder of the image file, and then install them one by one in a certain order through the rpm command, thereby successfully installing gcc; the other is Use the iso image to create a local yum source and use the yum install command to install it.

3. In addition to the compiler, you also need to install the kernel source code. Check it through the following command. If not, you need to download it.

rpm -qa | grep kernel
Copy after login

Enter the downloaded driver directory and use the make and make install commands to install the driver.

After installing the driver and restarting the network service, you can see that eth0 appears through the ifconfig command, and the problem is solved.

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if centos does not recognize the network card?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template