linux ifconfig 不返回 IP 地址

标签 linux ip ifconfig

我想知道我的linux(虚拟机)的IP地址 但是当我输入 ifconfig 时它不会返回 IP 地址。

通常它应该在“link encap”和“up Broadcast”之间,但事实并非如此。 去哪里看?

最佳答案

您的虚拟机有互联网连接吗?在我看来,它没有配置接口(interface)。

快速尝试一下,在 shell 中编写“dhclient eth0”。

如果仍然没有 IP,请发布 ifconfig 的输出。

关于linux ifconfig 不返回 IP 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19661208/

相关文章:

tcp - 我们在互联网上使用的是 TCP/IP 还是 OSI?

ubuntu - 容器上具有不同网关的 Docker

Linux Shell 脚本 : How to compare a specific field in a text document with specific text in an if statement

amazon-ec2 - 将弹性 ip 与另一个帐户上的实例相关联

linux - 错误 "Failed connect to github.com"

C# 屏蔽文本框

xml - Magento 2 : ifconfig in xml for module enable/disable

linux - 获取每个ip地址/ifconfig接口(interface)命令Linux的前3行

linux - 如何在 linux c 上添加 dir.h 库

linux进程不断断开连接