WSL Windows subsystem for linux
install
wsl --install Ubuntu-24.04 --name Number2
backup and restore
commands from link:
# backup
wsl -l
wsl --export (distribution) (file path)
# remove
wsl -v
#-> uninstall dist form startmenu
wsl --unregister <distribution>
# restore
wsl --import (distribution) (install location) (file path)
wsl --distribution (distribution)
move / clone distribution
not tested !!!
wsl --export Debian C:\temp\Debian.tar
wsl --import MovedDebian C:\WSL\Debian C:\temp\Debian.tar --version 2
wsl --distribution MovedDebian
settings
Mirrored Mode WSL2 Networking
from superuser.com
Note: Requires Windows 11 23H2 or later
In Mirrored mode, localhost should "just work". To enable:
-
Add the following to your
<windows_user_profile>/.wslconfig:[wsl2] networkingMode=mirrored #autoProxy=false # only if necessary ? -
Exit your WSL distribution
-
Run
wsl --shutdownfrom PowerShell then restart WSL
You should then be able to access services running in Windows via localhost.
Note that when running in Mirrored mode, mDNS will not work.
hosts configs:
edit C:\Windows\System32\drivers\etc\hosts in admin mode
add:
127.0.0.1 shop.local
non mirrored wsl2 mode
-
simple check that the
./wslconfigfile is empty or at leastnetworkingMode=mirroredis not set. -
check the im address:
wsl hostname -I
TODO
No comments to display
No comments to display