Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 742
Ethan Fischer Avatar asked Jun 08 '17 03:06

Ethan Fischer


People also ask

How do I open Explorer in WSL?

From within WSL Whenever you are in a directory in WSL that you would like to access from File Explorer, simply type: $ explorer.exe .

How do I open Windows Explorer in Git bash?

Type start . - it will open Windows Explorer at the current location.

How do I open Windows Explorer from terminal?

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.

How do I view WSL2 files in Windows Explorer?

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.


1 Answers

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.

like image 51
heartyporridge Avatar answered Oct 27 '22 09:10

heartyporridge