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
转载于:https://www.cnblogs.com/xixisix/p/11043098.html
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
转载于:https://www.cnblogs.com/xixisix/p/11043098.html