Windows 10: Choosing default for bash in cmd

Discus and support Choosing default for bash in cmd in Windows 10 Support to solve the problem; Hi all, I have installed git before, so as a side effect, mingw is also installed. Currently, if I type bash in cmd, I got in bash provided by... Discussion in 'Windows 10 Support' started by bbbhh, Mar 15, 2017.

  1. bbbhh Win User

    Choosing default for bash in cmd

    Hi all,

    I have installed git before, so as a side effect, mingw is also installed. Currently, if I type bash in cmd, I got in bash provided by mingw.
    Now I want to activate Linux subsystem on windows 10. The question is, can I set the default or configure what the bash command in cmd should do (either active Linux subsystem or get into mingw).


    bbbhh, Mar 15, 2017
  2. chirag1 Win User

    windows 10 administrator cmd access denied

    hi,i am learning bash like said in teaching books about bash script I tried this below command as a administrator from administrator cmd.Dont know why I searched it in google that but it simply said that I have to open cmd like search it then
    click left click from mouse then choose administrator option then some promt will pop up then hit yes to open a administrator cmd I did exactly.and I am sure that I am doing this in administrator cmd but don't know why I am getting access denied

    Choosing default for bash in cmd [​IMG]
    chirag1, Mar 15, 2017
  3. [Win10 16299.19]: ubuntu subsystem cannot be open with error code 0x80070002

    Also,I got the same error code when “bash“ is executed in CMD/POWERSHELL.
    yulei900609, Mar 15, 2017
  4. Pyprohly Win User

    Choosing default for bash in cmd


    On the Windows command line, if you know you have two commands with the same name available for use on your system, the one listed first in the Path environment variable will be used. However, if it exists, the one residing in the current directory will take precedence.

    Enabling the Windows Subsystem for Linux places a bash.exe binary in C:\Windows\System32. This will be the bash instance used if an executable named “bash” doesn’t exist in any of the paths listed before C:\Windows\System32 in the Path. But if your command prompt is open at C:\Windows\System32, C:\Windows\System32\bash.exe will be used regardless of bash-es in the Path.

    You can view the Path variable on the command prompt by echo-ing it.
    Code: C:\Users\>echo %path% C:\Program Files (x86)\Parallels\Parallels Tools\Applications;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Users\\AppData\Local\Microsoft\WindowsApps C:\Users\>echo %path:;=&echo(% C:\Program Files (x86)\Parallels\Parallels Tools\Applications C:\Program Files (x86)\Intel\iCLS Client\ C:\Program Files\Intel\iCLS Client\ C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\Program Files\dotnet\ C:\Users\\AppData\Local\Microsoft\WindowsApps C:\Users\>[/quote] Sometimes you may need to reorder the Path if a particular instance of a command being used isn’t the one you need quick access to. Editing the Path variable can be done through Control Panel > System and Security > System > Advanced system settings > Environment Variables….

    A quick and easy way to determine which instance of a command will be used for the current command prompt session is to use the where command. E.g.,
    Code: C:\Users\>where bash C:\Windows\System32\bash.exe C:\Windows\bash.bat[/quote] The first one listed is the one that will be used if the command was to be typed.
    Pyprohly, Mar 15, 2017

Choosing default for bash in cmd

  1. Choosing default for bash in cmd - Similar Threads - Choosing default bash

  2. Settings: 'Choose a default app by filetype'

    in Windows 10 Software and Apps
    Settings: 'Choose a default app by filetype': I am trying to set a default app for an extension but the default apps list won't show the app even though it is operational, listed under 'Apps and features' and valid. How can I select this app?...
  3. Choosing a default web browser

    in Windows 10 Installation and Upgrade
    Choosing a default web browser: Since people using Windows 10 were given the right to choose the default browser we wanted, Microsoft should provide a way to install IE11 Microsoft should provide an alternative download? So, where is the Alternative?? Ruth 801...
  4. Canceling choose a default program

    in Windows 10 Ask Insider
    Canceling choose a default program: [IMG] Hi, I have a question about restoring back the "choose a default app by file type", I accidentally picked a default program which I didn't mean to. And I want go back to where there shouldn't be any default program associate with that file extension, is there any way...
  5. Change a default file type back to 'Choose a default'

    in Windows 10 Software and Apps
    Change a default file type back to 'Choose a default': WIN10, Version 2004, Build 19041-264 I have accidentally changed a file default and I want to change it back to 'Choose a default'. I have already tried 'reset' defaults but it will not change the default. Can you please help. 157993
  6. Help choosing default app for files

    in Windows 10 Ask Insider
    Help choosing default app for files: Hi, I have a good amount of webp images in my computer and I like to use the default Photos app to visualize them. I downloaded something called 'codecs webp' or similar so I could see my images on the default photo visualizer and it worked fine. Today, when I was going to...
  7. Cannot choose default browser

    in Windows 10 Customization
    Cannot choose default browser: I know how to set the default browser in Windows 10. Settings>Apps>Default apps. A recent update to Windows 10 has locked in MS Edge as my default browser. I cannot choose any other browser including IE11. I want Firefox to be my default browser. Also NONE of the following...
  8. Choosing Default Apps

    in Windows 10 Software and Apps
    Choosing Default Apps: I have about 20 or so apps on my computer but only 3 or 4 of them are presented as choices when I try to set one as default. The default I want is installed but it doesn't show up in the SET DEFAULT APPS process. VERY FRUSTRATING....
  9. choose default apps by file type

    in Windows 10 Customization
    choose default apps by file type: I want .tif and .tiff files to be opened by MODI. MODI is installed on my computer but does not show up as an option
  10. Choosing default graphics card???

    in Windows 10 Graphic Cards
    Choosing default graphics card???: Hello, I have an AMD Radeon R5 340X graphics card installed in my Dell Inspiron 3650 desktop pc and I have been trying to figure out how to make the original Intel Xeon E3 graphics card that came with my PC the default card again. I feel like I remember seeing the option to...