New
#1
Static IP for Linux Under WSL?
Is it possible to set a static ip for linux distros(Manjaro in this case) running under WSL?
Is it possible to set a static ip for linux distros(Manjaro in this case) running under WSL?
This docs file says a lot of useful stuff about networking in WSL1 and 2. Looks like you should be able to do what you need at the command line to assign the same IP address each time the VM runs. It's not exactly the same thing as a static IP assignment, but hopefully it's "close enough."
HTH,
--Ed--
https://docs.microsoft.com/en-us/win...mpare-versions
Am I understanding this correctly?
Should open up port 2244 on both windows and manjaro and forward this port through to my static ip on Windows to Manjaro?Code:netsh interface portproxy add v4tov4 listenport=2244 listenaddress=0.0.0.0 connectport=2244 connectaddress=192.168.1.110
So far I haven't had any success with that command and trying some variations of it.
Well for starters, I would like to be able to ssh in to my Manjaro box(so to speak) even on the go via my phone. My initial approach seems unnecessary I suppose so long as I can forward the proper ports directly to Manjaro.
I get this:
PS C:\WSL\Manjaro> wsl -d "Manjaro" hostname -Ihostname: invalid option -- 'I'
Try 'hostname --help' or 'hostname --usage' for more information.
- - - Updated - - -
Oh and my system is only returning 127.0.0.1
Code:PS C:\Users\Xplor> wsl -d "Manjaro" hostname -i127.0.1.1
Actually, it looks like your box is returning 127.0.1.1 Apparently this is a Debian thing that the installer will create this IP address for system without a permanent IP address to address some software that won't work without an entry. I'm not familiar with Debian distros (besides a bit of Ubuntu), I have worked with the Red Hat based distros my entire career.
I'm not sure why you are not getting a 172.16.x.x/20 range IP address. i've always gotten one with WSL2. Here is the output from my work machine.