How do I find out the IP address of my Crostini container?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 06:41:19

问题


I'm running a Node.js server on Crostini, and trying to access it from and Android browser running on the same Chrome OS device via localhost:8080 doesn't work.

I've tried penguin.linux.test:8080, but that didn't work either. Looks like the Android container didn't get the right DNS settings.

So how do I get the IP address of the Linux container? ifconfig is not installed and apt install fails to get it.


回答1:


Even easier is just to use hostname -I. This will output the ip address and nothing else




回答2:


ifconfig is deprecated. Use instead:

ip addr show



来源:https://stackoverflow.com/questions/53215483/how-do-i-find-out-the-ip-address-of-my-crostini-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!