0

I am opening in ConEmu my default WSL2 terminal with the task:

wsl.exe ~ -cur_console:pm:/mnt

Until now I had just one Linux Distribution in WSL2 - Ubuntu-18.04. Now I have the second machine on WSL2 - Ubuntu-20.04 which I set as default. ConEmu now opens the default Linux Distribution terminal. Is is possible to set another task which will open the second Linux Distribution Terminal, which is not set as default in Windows?

Anatol
  • 181
  • 2
  • 8

1 Answers1

1

ConEmu documentation already contains all required information: https://conemu.github.io/en/BashOnWindows.html#wsl-distro

  1. Find the name of your distribution in the registry under

    HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss
    
  2. Modify task for your WSL by inserting directly after wsl.exe the --distribution <Name> without quotes. Example:

    wsl.exe --distribution Debian ~ -cur_console:pm:/mnt
    
Maximus
  • 10,751
  • 8
  • 47
  • 65
  • Thank you very much! It works only if I remove `~` If I don't remove it the message is: `zsh:1: permission denied: /root` How to set it to open in the root directory? – Anatol Oct 29 '20 at 19:08
  • That is the question for zsh, not related to the answer. I don't know what's happening there. – Maximus Nov 18 '20 at 12:38