linux中修改ip地址
fedora linux中修改ip地址
修改网卡eth0
putty中远程连接好,
[root@localhost ~]# find /etc/ -name ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# vi ^C
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=none
DEFROUTE=yes
DHCPCLASS=
HWADDR=00:0C:29:BC:4E:59
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
ONBOOT=yes
OPTIONS=layer2=1
TYPE=Ethernet
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.137.3
PREFIX=24
GATEWAY=192.168.137.1
DNS1=192.168.137.1
NAME="System eth0"
MTU=1500
IPADDR=192.168.137.3 改成 IPADDR=192.168.137.2 保存,试试
发现这时putty连接不上了,重连新IP地址,成功