Scratchpad
/etc/wsl.conf
Set the default user for a WSL2 instance
[user]
default=<string>Enable localhostForwarding
[wsl2]
localhostForwarding=trueRemove Windows Path from WSL
[interop]
appendWindowsPath=falseStart WSL2 as a specific user
wsl -d <distro> -u <user>Notes when creating from rootfs
Create a non-root user
Within Windows Terminal, ctrl + , for settings. Select the wsl instance from the left pane and set the starting directory to //wsl$/distroname/home/username

Last updated
Was this helpful?