Install Windows Subsystem for Linux
Windows Subsystem for Linux WSL has Ubuntu LTS releases among other Linux distros on the Microsoft Store. The Microsoft Store is the recommended method to install WSL.
If the Microsoft Store isn’t available on the computer, manual WSL install is also available. The WSL release notes shows the continually expanding WSL feature set.
WSL can use GUI and sound with programs like Spyder via WSLg.
List WSL distros already installed on the computer from PowerShell / Command Prompt:
wsl --list --verboseCheck WSL status, install a distro, and list installable distros from PowerShell / Command Prompt:
wsl --status
wsl --list --online
wsl --install -d UbuntuTo change the default distro later, use:
wsl --set-default UbuntuWSL configuration
Limit the amount of RAM WSL2 can use for all installed WSL instances by editing Windows file $HOME/.wslconfig to include:
[wsl2]
swap=0
memory=4GBSet memory= to less than the total computer physical RAM to help avoid using Windows swap.
A per-WSL instance default that is confusing and slows down WSL program-finding is stuffing Windows PATH into WSL PATH. We normally disable Windows PATH injection into WSL, because it also breaks library finding in build systems like CMake. Additionally, we enable filesystem metadata, as weird permission errors can occur, even causing CMake to fail to configure simple projects.
Add to each WSL instance /etc/wsl.conf file:
[interop]
enabled=false
appendWindowsPath=falseRun Ubuntu apps from Windows Command Prompt or PowerShell:
wsl ls -lRun Windows program from Ubuntu terminal:
/mnt/c/Windows/System32/notepad.exeNote that capitalization matters and .exe must be at the end.