1.删除MAC地址,修改IP
[[email protected] network-scripts]# vim ifcfg-eth0
[[email protected] network-scripts]# cat !$ #删除MAC地址,修改IP
cat ifcfg-eth0
DEVICE=eth0
NM_CONTROLLED=yes
IPADDR=192.168.1.63
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
PREFIX=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="eth0"
2.修改主机名
[[email protected] ~]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=xuegod63.cn
3.删除网卡信息文件
[[email protected] network-scripts]# rm -rf /etc/udev/rules.d/70-persistent-net.rules
重启:
reboot
原文地址:https://www.cnblogs.com/hailun1987/p/9571586.html
时间: 2024-10-09 03:06:21