More easily invoke Windows apps and tools from Bash on Windows


Along with support for ifconfig & network connection enumeration, Windows 10 Insider Build 14965 delivers a small but important change was made which will enable you more easily invoke Windows tools & applications from within Bash:

Your Windows user environment path is now appended to the WSL path by default. This means you can now type notepad.exe (or the name of any other app on your default Windows path) without adding the absolute path to the .exe, or to your Linux path itself!

2016-11-10-4

Also, GitHub issue #1254 has been fixed, allowing you to invoke Windows binaries from within Bash even if the current working directory contains non-ansi characters.

 

Be sure to let us know how this works for you: If you discover problems, please file an issue on our GitHub issues repo, or if you’d like to reach out, you can ping me on Twitter: https://twitter.com/richturn_ms. Look forward to hearing from you 🙂

Comments (4)

  1. Any idea why my $PATH is truncated? Because I’m running as root?

    root@Surface:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Users/biser/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Microsoft VS Code/bi

    1. Good Q. Could you try again on last week’s build and if it’s still truncated, file an issue on our GitHub: https://github.com/microsoft/bashonwindows/issues.

      Thanks.

  2. Mehdi HosseinZade says:

    hi
    can we use wsl (bash) path in windows path?
    for example install oracel-java in wsl and use in android stadio (windows)?

    1. No – The Linux filesystem isn’t exposed to Windows as a drive that it can navigate around. Instead, call `bash.exe -c “”` from Windows to invoke a Bash command/script within Bash/WSL.

Skip to main content