简体   繁体   English

linux ifconfig不返回IP地址

[英]linux ifconfig doesn't return an IP address

I want to know the IP adress of my linux (virtual machine) but when i enter ifconfig it doesn't return an IP adress. 我想知道我的linux(虚拟机)的IP地址,但是当我输入ifconfig时,它不会返回IP地址。

Normally it should be between "link encap" and "up broadcast" but it's not.. where to look? 通常,它应该在“链接封套”和“向上广播”之间,但不是。在哪里看?

Does your VM have internet connection? 您的VM是否可以连接互联网? It seems to me that it doesn't have the interface configured. 在我看来,它没有配置接口。

Quick try, write in a shell "dhclient eth0". 快速尝试,在外壳程序“ dhclient eth0”中编写。

If it still doesn't have IP, post the output of ifconfig. 如果仍然没有IP,请发布ifconfig的输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM