linux clone cannot view ip, solve by modifying ip

Modify the ip as follows

su to enter the super user

Comment the first eth0 in vi /etc/udev/rules.d/70-persistent-net.rules, change the following eth1 or others to eth0, press esc, and then press shift+zz to save quickly

Configure in vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
IPADDR=192.168.85.135
NETMASK=255.255.255.0
#(网关,同ip最后一位为1)
GATEWAY=192.168.85.1  
DNS1=114.114.114.114
ONBOOT=yes
BOOTPROTO=static


Finally , start service network start

Guess you like

Origin blog.csdn.net/weixin_43793525/article/details/122172198