I have two Linux subsystems install Ubuntu 18.04 and Kali Linux. Presently when I run wsl ls ~ it executes on Kali Linux how do I instruct wsl.exe to execute commands on Ubuntu 18.04?

From command prompt:

C:\>wsl ls ~/


From Ubuntu 18.04:

colton@DESKTOP-SHJ6OK8:~$ ls ~

From Kali:

colton@DESKTOP-SHJ6OK8:~$ ls ~
  • 1
    According to docs.microsoft.com/en-us/windows/wsl/wsl-config , you can run the command "wslconfig /setdefault name". Replace name with the appropriate distribution name, probably "ubuntu" for you. I don't have multiple subsystems installed so can't verify, but if that works for you, please create that Answer below. – Christopher Hostage Oct 31 '18 at 19:31
  • Command: wsl.exe --distribution <distro-name>. – Biswapriyo Oct 31 '18 at 20:20

You may enter the shell of a distribution from the Start menu :


You may enter the shell from the command-line by running :


You may execute one particular WSL command from the command-line, returning to the command-line prompt, by running :

ubuntu.exe run ls ~/

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.