1、修改方式与centos6基本一样:https://www.cnblogs.com/hunttown/p/5453367.html
2、命令
vim /etc/sysconfig/network-scripts/ifcfg-ens3 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens3 UUID=ad0fdbd8-31b9-42b3-a5ad-cf9805a3b307 DEVICE=ens3 ONBOOT=yes IPADDR=192.168.200.42 PREFIX=24 GATEWAY=192.168.200.254 DNS1=114.114.114.114 IPV6_PRIVACY=no
3、重启网络服务
nmcli c reload ens3 nmcli c up ens3
4、查看IP
ifconfig