4,461
edits
keep WSL2 running |
mNo edit summary |
||
Line 1: | Line 1: | ||
Install WSL< | Install WSL<syntaxhighlight lang="powershell"> | ||
PS C:\Users\micha> wsl --install | PS C:\Users\micha> wsl --install | ||
Installing: Windows Subsystem for Linux | Installing: Windows Subsystem for Linux | ||
Line 6: | Line 6: | ||
Ubuntu has been installed. | Ubuntu has been installed. | ||
The requested operation is successful. Changes will not be effective until the system is rebooted. | The requested operation is successful. Changes will not be effective until the system is rebooted. | ||
</ | </syntaxhighlight>List available Linux distributions<syntaxhighlight lang="powershell"> | ||
PS C:\Users\micha> wsl --list --online | PS C:\Users\micha> wsl --list --online | ||
PS C:\Users\micha> wsl -l -o | PS C:\Users\micha> wsl -l -o | ||
</ | </syntaxhighlight>Install additional Linux distributions after the initial install<syntaxhighlight lang="powershell"> | ||
wsl --install -d <Distribution Name> | wsl --install -d <Distribution Name> | ||
</ | </syntaxhighlight>Check the installed version of WSL<syntaxhighlight lang="powershell"> | ||
wsl -l -v | wsl -l -v | ||
</ | </syntaxhighlight>Change the default Linux distribution used with wsl<syntaxhighlight lang="powershell"> | ||
wsl -s <Distribution Name> | wsl -s <Distribution Name> | ||
</ | </syntaxhighlight>Run a specific distribution (when there are multiple ones)<syntaxhighlight lang="powershell"> | ||
wsl -d <Distribution Name> | wsl -d <Distribution Name> | ||
</ | </syntaxhighlight> | ||
Start WSL2, exit, and then keep WSL2 running | Start WSL2, exit, and then keep WSL2 running | ||
< | <syntaxhighlight lang="powershell"> | ||
wsl --exec dbus-launch true | wsl --exec dbus-launch true | ||
</ | </syntaxhighlight> |