Centos 8 is installed, but ens33 cannot be found? Doesn’t the IP address show up (not even for v4v6)? ifconfig only shows inet6, no ipv4 address? Record the solutions to these pitfalls I encountered.

1. Centos 8 is installed, but there is no network card ens33 in ifconfig.

This problem has troubled me for a long time. I believe everyone is like this. When I encounter a problem, I search online. After searching for a long time, I feel dizzy. I haven’t found a reliable method. The reason is that we don’t know what is wrong. . I hope that everyone will have the habit of recording problems after solving them and posting them online. We will work together to make it faster and less painful for programmers to find bugs. Without further ado, let’s get straight to the practical stuff.

The reason is that when I created the virtual machine, I did not choose the exact Linux distribution. VMware thought that you were a master and played with the kernel by yourself, so it did not assign you a network card corresponding to centos (I guess this is what it meant, hehe). Solution: If you have already installed centos8 and have to reinstall it, please note that the .iso file can be reused. You should not foolishly go to the official website to download a few gigabytes of new files. Just delete the files generated by vmware reading the .iso when you installed centos before.

The picture above is the correct version. Note: I am using vmware15, which does not have Centos 8. It is also feasible to choose Centos 7 directly. But never choose anything else... as shown below, this is the source of the error.
Insert image description here

I just wrote it down casually, there may be typos, don’t mind, hehe.

2. Solved the network card problem, but found that ifconfig has no IP (neither v4 nor v6)

This is easy to solve. It turns out that after entering centos, you need to manually click to connect to the network (this is only for students who have installed a graphical interface) as shown below: click the upper right corner, and then click Connect. What I show here is connected.
Insert image description here
I have read many solutions on the Internet, and they probably all mean to ask you to change the file configuration and set the Linux network connection to automatic connection (that is, the Linux system will automatically open when it is turned on, and you do not need to go to the interface settings to open it manually. ), but you already understand what it means, why do you still set it to automatic? Can't you just control it according to your needs?

3. After opening the network, I found that there is only inet6 and no ipv4 address. If this problem is not solved, you will not be able to use xshell or Winscp. (For students who set ipv4 to DHCP to obtain automatically)

The solution is to open the service management of Windows and restart the vm dhcp service. The steps are provided with pictures:

1) Win + R to open the run box and enter as shown.

Insert image description here

2) Find the VMware DHCP Service and start or restart it, and the problem will be solved.

Insert image description here
Finally: I will be very happy if I can help you, this is also one of my values. I am really tired of learning computer skills by myself. I hope I can help you and make you less tired. 2021 5.13 18:09.

Guess you like

Origin blog.csdn.net/weixin_43522377/article/details/116758667