今天学习linux时想用Xshell连接虚拟机发现只有ipv6没有ipv4,
网上搜索到解决方案:
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="0:02:8A:A6:40:35"
IPADDR="192.168.0.254"
NETMASK="255.255.255.0"
GATEWAY="192.168.0.1"
ONBOOT="yes"
BOOTPROTO="none"
USERCTL="no"
Type="Ethernet"