The linux virtual machine cannot find the network card eth0

王林
Release: 2019-12-11 16:51:06
Original
6985 people have browsed it

The linux virtual machine cannot find the network card eth0

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
Copy after login

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地址
Copy after login

3. Use the command: service network restartRestart 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!

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