Answers for "get start wsl2"

-1

how to WSL2

Enable Windows Subsystem for linux: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Enable Virtual Machine Platform: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Download WSL2 kernel: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

Set default WSL verison: wsl --set-default-version 2
Posted by: Guest on May-09-2021
1

start wsl with command

Create a dedicated profile:
The commandline option also accepts arguments, which are directly passed to the shell on startup, allowing the direct usage of wsl.exe with an additional "startup command":
{
  "guid": "{...}",
  "hidden": false,
  "name": "Ubuntu SSH",
  "commandline": "wsl.exe ssh -L 3306:localhost:3306 -L 5900:localhost:5900 -L 8001:localhost:8001 [email protected]",
}
I can now start the shell via a batch file, which runs using the below; however, the downside is the new profile is shown in Windows Terminal's Profile Selection Menu:
wt -p "Ubuntu SSH"
Posted by: Guest on April-20-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language