# 查看网卡信息
sudo nmcli
# 网卡配置信息重新加载并启用
sudo nmcli c reload
# 方法二
ifdown和ifup
CentOS9 Steam
配置文件路径
/etc/NetworkManager/system-connections/网卡名
[connection] id=enp0s3 uuid=0562b3c0-0b5f-37cc-b4f7-63390c5f236b type=ethernet autoconnect-priority=-999 interface-name=enp0s3 timestamp=1652055112 [ethernet] [ipv4] method=manual # 静态设置 address1=192.168.24.199/22,192.168.25.3 # IP/掩码/网关 dns=114.114.114.114;8.8.8.8; # DNS设置 [ipv6] addr-gen-mode=eui64 method=auto
nmcli c reload
nmcli c up <网卡名>
# 安装CentOS9 EPEL
dnf config-manager --set-enabled crb dnf install epel-release epel-next-release