3

Navigating between the WSL Bash shell and the Windows environment can be challenging because the path in windows is say: C:\Windows and in bash it is: /mnt/c/Windows Launching the Windows Explorer using the Current Working Directory (CWD) does not work by doing: start .

What is the command that I should type?

3 Answers 3

3

As of now you just need to write

#!/bin/bash
explorer.exe

inside of your script.sh file and you can run it with

bash script.sh
2

Seems by default /mnt/c/Windows is not in the bash path environment variable so the best so far is: /mnt/c/Windows/explorer.exe .

2

found this: https://stackoverflow.com/questions/44245721/launching-explorer-from-wsl

Essentially:

alias start='cmd.exe /c start'

then start . will work too.

Note: it will not start an explorer on linux only files, but any mapped windows file systems will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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