Open CWD in File Explorer | 20.04 LTS on Windows 10

How do I open CWD in file explorer, Windows?

I have tried the following lines but without luck:

open .

explorer .

open() {
  explorer.exe `wslpath -w "$1"`
}



To open the current working directory from WSL in the host's Windows Explorer, you can use:

explorer.exe "$(wslpath -w "$PWD")"

More generally, a shell function to open a given directory may be written as

weopen() { explorer.exe "$(wslpath -w "$1")"; }

You can then use

weopen .

to open the current directory, .