目录
1、网卡规范名称
[root@server ~]# grubby --update-kernel ALL --args net.ifnames=0
# 内核中禁止使用net.ifnames模块,这样可以让网卡显示为ethx
# 后再重启reboot,使内核生效, 网卡名则显示为eth开头
2、网卡配置文件目录
——除RHEL9外配置网卡的配置文件目录
[root@server_node ~]# cd /etc/sysconfig/network-scripts/
[root@server_node network-scripts]# vim ifcfg-eth0
[root@server_node network-scripts]# cat ifcfg-eth0
DEVICE=eth0 # 网卡名字
ONBOOT=yes # 网卡服务启动自动激活网卡
BOOTPROTO=dhcp # 网卡工作模式
NAME=eth0 # 网络链接名称
[root@server_node network-scripts]# nmcli connection reload
[root@server_node network-scripts]# nmcli connection up eth0
连接已成功激活(D-Bus 活动路径:/org/freedesktop/NetworkM