5

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.

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404

2 Answers2

7

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

Ammaar Patel
  • 156
  • 1
  • 7
4

ifconfig is deprecated. Use instead:

ip addr show

ip addr show on Crostini

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
  • can you give a little insight to why/when ifconfig was depr.? seems to be still part of net-tools when installed on newer versions – x4g0tt3nSou1x Mar 26 '23 at 12:56