DEV Community

Discussion on: Setting up Arch Linux with KDE Plasma in Windows Subsystem for Linux 2

Collapse
 
ati46 profile image
ati46

I saw that 127.0.0.1 is used as the link address in the tutorial. This method is possible in wsl1, but I can’t implement it on wsl2. I can only use export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk'{print $2; exit;}'):0.0 Get the ip of wsl2 dynamically. And the link will be broken every time the wifi is changed or disconnected. Can you explain how to use 127.0.0.1 in wsl2?

Collapse
 
rashil2000 profile image
Rashil Gandhi

You can't use 127.0.0.1. WSL2 is no longer running natively (i.e. through translation). It's a virtual machine now. So it'll function the same as a VM; it'll have it's own network interfaces separate from those of Windows.