I know that in the Mac OS10, people use the open .
command to open the current directory.
Does anybody please know the appropriate command to do the same task under Bash on Windows?
Cheers!
By default, bash shows just your current directory, not the entire path. To determine the exact location of your current directory within the file system, go to a shell prompt and type the command pwd.
Simply type in wt in the address bar and it will open the command prompt with the path to your current folder already set.
Using Windows Explorer, navigate to any directory you want, type "cmd" in the address bar it will open Windows command prompt in that directory. Along the same lines, if you have the git directory in your path, you can type "git-bash" in the address bar and a Git Shell will open in that directory.
Press Windows key + X then click Command prompt, at the command prompt, type: bash then hit Enter. If you want to be able to access the local file system, press Windows key + X, Command Prompt (Admin) then type bash at the prompt.
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 | pbcopy open . 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.
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