vi /etc/sysconfig/network-scripts/ifcfg-en-xx #追加 BOOTPROTO=dhcp ONBOOT=yes IPADDR=192.168.x.x NETMASK=255.255.255.0 #重启网络 systemctl restart network ping baidu.com