[英]How do I find out the IP address of my Crostini container?
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. 我正在Crostini上运行Node.js服务器,并试图通过localhost从同一个Chrome OS设备上运行的Android浏览器访问它:8080不起作用。
I've tried penguin.linux.test:8080
, but that didn't work either. 我尝试过penguin.linux.test:8080
,但这也penguin.linux.test:8080
。 Looks like the Android container didn't get the right DNS settings. 看起来Android容器没有得到正确的DNS设置。
So how do I get the IP address of the Linux container? 那么如何获取Linux容器的IP地址? ifconfig
is not installed and apt install
fails to get it. 未安装ifconfig
且apt install
无法获取。
Even easier is just to use hostname -I
. 更简单的就是使用hostname -I
。 This will output the ip address and nothing else 这将输出IP地址,没有别的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.