centos8 更改IP
更改 配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="static" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="eth0" UUID="1979317b-5932-44d5-b527-e2f609a448a2" DEVICE="eth0" ONBOOT="yes" IPADDR=192.168.123.10 NETMASK=255.255.255.0 GATEWAY=192.168.123.1 DNS1=8.8.8.8
更改后执行
nmcli c reload
nmcli d reapply eth0