输入: vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=aa810323-8568-4664-9123-221c3446eb79
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=“System eth0”
HWADDR=00:0c:29:be:cf:7b
PEERROUTES=yes
IPADDR=192.168.220.250
NETMASK=255.255.255.0
GATEWAY=192.168.220.1
DNS1=8.8.8.8
USERCTL=no
参考:网卡配置参考