How to use WSL as default terminal in WebStorm or any other JetBrains’ products?

After a bit of search on google found a solution to my question.

First figure out the default wsl with the command:

C:\Windows\System32\wslconfig /list

Windows Subsystem for Linux Distributions:
Ubuntu-18.04 
Legacy (Default)

then I set the default to Ubuntu-18.04 by

C:\Windows\System32\wslconfig /setdefault Ubuntu-18.04

Finally set the terminal path in Webstrom settings>tools>terminal to

C:\Windows\System32\wsl.exe

Now open the terminal it is correctly move the current directory to the /mnt/c/blah/blah

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)