I have a bash script that does, among other things, MY_IP="$(ifconfig en0 inet)" but apparently Ubuntu 20.04 / Hyper-V / WSL2 doesn't have ifconfig.
Is there a way to install it or do I need to rewrite my scripts to work around it? If so what would be a good way to work around it?
Thanks!
1 Answer
As per - ipconfig has been deprecated (meaning you ideally should rewrite your scripts to use IP).
That said you can "apt install net-tools" to install the old ifconfig packages, and it should "play nice".