====== Linux Subsystem for Windows (WSL) ======
The newest version of the Linux system inside a Windows system is [[https://learn.microsoft.com/en-us/windows/wsl/|WSL2]], you should only use that one.
===== Storage =====
WSL files are stored in ''$(home)\AppData\Local\lxss\'' (or ''%%\\wsl$\Ubuntu%%'' as shorthand)
By default, this folder is invisible to Windows Explorer, even if "Show Hidden Folders" is enabled.
* [[https://learn.microsoft.com/en-us/windows/wsl/file-permissions|File permissions]]
===== SSH agent =====
If you want to forward your Windows SSH agent into the WSL2 environment, you have to pipe it through, e.g. by using [[https://github.com/jstarks/npiperelay|npiperelay]].[(source: [[https://dracos.co.uk/wrote/wsl/]])]
===== Networking =====
* [[https://docs.microsoft.com/en-us/windows/wsl/networking|Accessing network applications with WSL]]
===== Troubleshooting =====
* [[https://docs.microsoft.com/en-us/windows/wsl/troubleshooting|Troubleshooting Windows Subsystem for Linux]]
==== can't chmod in WSL2 ====
Edit the ''wsl.conf'' in the distributions ''/etc'' to sync metadata with Windows.[(source: [[https://stackoverflow.com/questions/46610256/chmod-wsl-bash-doesnt-work|chmod WSL (Bash) doesn't work - Stack Overflow]])]
[automount]
options = "metadata"
Afterwards, ''wsl %%--%%shutdown'' (shuts down all distributions!) in Powershell.