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
From within WSL Whenever you are in a directory in WSL that you would like to access from File Explorer, simply type: $ explorer.exe .
Type start . - it will open Windows Explorer at the current location.
If you like working with Windows Terminal, Command Prompt, or PowerShell, type the command explorer in any of them and press Enter. This immediately opens File Explorer from CMD in Windows 11 and Windows 10 or Windows Explorer in Windows 7.
You can access WSL2 Linux files from the network path \\wsl$\ . Enter it in the File Explorer address bar or any file open dialog. Here, <yourname> is the username you defined during installation. It's best to set this as the starting folder for the distro in Windows Terminal.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With