'Opening explorer from bash/linux subsystem in Windows 10

Is there a command to open the current directory in windows file explorer from bash (or zsh) using bash on ubuntu on windows? I think I saw somewhere you can do explorer . but it tells me No command 'explorer' found



Solution 1:[1]

Since the Windows 10 Anniversary Update, you can now directly run Windows executables from Bash/WSL. Try updating Windows through Windows update, and then run the following in Bash:

$ explorer.exe .

Alternatively,

$ /mnt/c/Windows/explorer.exe .

(where c is the drive of your Windows installation`). This will open a new Explorer window in the current directory.

Solution 2:[2]

This works well for me on my GIT bash on windows 10.

$ which explorer
/c/Windows/explorer
$ explorer .

Solution 3:[3]

I wasn't able to get $ /mnt/c/Windows/explorer.exe . to work for me. What worked for me was installing Search Everything and using it to search for a file in the current directory. You can then right-click the file in the results and hit Open Path.

Solution 4:[4]

Running this command below, you can create a Symlink which you can refer by /explorer.exe

sudo ln -s /mnt/c/Windows/explorer.exe explorer.exe

Now run:

/explorer.exe .

Solution 5:[5]

If you're using zsh, you can try:

$ echo 'alias <your alias|open>="/mnt/c/Windows/explorer.exe"' >> ~/.zshrc && source ~/.zshrc

bash:

$ echo 'alias <your alias|open>="/mnt/c/Windows/explorer.exe"' >> ~/.bashrc && source ~/.bashrc

Then only you can do:

 $ <your alias|open> path

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 heartyporridge
Solution 2 asatsi
Solution 3 Adam
Solution 4 testing_22
Solution 5 Antonio Contreras