编辑配置文件vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.1.110
PREFIX=24
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=114.114.114.114
IPV6_DISABLED=yes
重新加载配置文件
nmcli connection load /etc/sysconfig/network-scripts/ifcfg-enp0s3
激活配置文件
nmcli connection up /etc/sysconfig/network-scripts/ifcfg-enp0s3
标签:RockyLinux9,network,配置文件,no,配置,网络,enp0s3,sysconfig,yes
From: https://www.cnblogs.com/cy-e/p/17277595.html