After recently installing CentOS with VMware, when using ifconfig to configure the IP, I found that the network card eth0 was missing.
1. Use the command: ifconfig eth0 up
to start the network card, but the IP address, subnet mask and gateway are all wrong.
You can use the following command to change:
ifconfig eth0 10.0.13.24 netmask 255.255.255.0 gateway 10.0.13.1
If the network connection method uses bridge, you can continue the following operations to configure network eth0.
Free learning video tutorial recommendation: linux video tutorial
2. Modify the /etc/sysconfig/network-scripts/ifcfg-eth0
file, The content is as follows:
DEVICE=eth0 // 设备名称 ONBOOT=yes // 在系统启动时激活设备yes或no BOOTPROTO=static // static或dhcp IPADDR=10.0.13.24 // IP地址 NETMASK=255.255.255.0 // 子网掩码 GATEWAY=10.0.13.1 // 网关 HWADDR=00:0C:29:96:38:F8 // MAC地址
3. Use the command: service network restart
Restart network service
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of The linux virtual machine cannot find the network card eth0. For more information, please follow other related articles on the PHP Chinese website!