How to open the current directory on Bash on Windows? How to open the current directory on Bash on Windows? windows windows

How to open the current directory on Bash on Windows?


Just Type

start .

it will open the current the directory folder.


You can now call explorer.exe from the bash subsystem. I've set up an alias to use it. I've added the copy to clipboard alias as well for good measure.

Alias:

alias open="explorer.exe"alias pbcopy="clip.exe"

Example:

cat ~/.ssh/id_rsa.pub | pbcopyopen .open "D:\\Dir"

The open alias plays well with ., but you'll need to pass it the Windows path if you want to specify a directory.


Right now Microsoft don't recommend to mix Windows explorer with the bash shell. In latest win10 Insider builds you could use from bash something like this

cmd.exe /c start .

If you are using Win10 Anniversary Edition you could try installing a Desktop Environment. Start reading thishttps://github.com/microsoft/bashonwindows/issues/637After that you could open a window with the present folder content with

gnome-open .