在安装的 Ubuntu 下输入 ifconfig 命令查看 ip 地址,发现 ip 地址为 10.0.2.15:

在 Windows 系统的 cmd 窗口 ping 一下,发现无法连接:

出现这种情况,是因为 VirtualBox 的默认网络连接方式为这个:

将它改为【桥接网卡】:

点击确定,再输入 ifconfig 命令:

在 Windows 系统的 cmd 窗口 ping 一下,发现可以连接上:

在安装的 Ubuntu 下输入 ifconfig 命令查看 ip 地址,发现 ip 地址为 10.0.2.15:
在 Windows 系统的 cmd 窗口 ping 一下,发现无法连接:
出现这种情况,是因为 VirtualBox 的默认网络连接方式为这个:
将它改为【桥接网卡】:
点击确定,再输入 ifconfig 命令:
在 Windows 系统的 cmd 窗口 ping 一下,发现可以连接上:
本文标题:Ubuntu ifconfig 查看 ip 地址为 10.0.2
本文链接:https://www.haomeiwen.com/subject/hsdjaftx.html
网友评论