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).

    Bests,

    :)
     
    bbbhh, Mar 15, 2017
    #1
  2. chirag1 Win User

    windows 10 administrator cmd access denied

    hi,i am learning bash scripting.so 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
    #2
  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
    #3
  4. Pyprohly Win User

    Choosing default for bash in cmd

    Hello,

    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
    #4
Thema:

Choosing default for bash in cmd

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

  2. cmd default setting's

    in Windows 10 Gaming
    cmd default setting's: i messed with my cmd settings and I want to get them back to how they were before I messed with themDoes anyone have a way to get back the defaults and if not can I get screenshots of anyone settings for cmd who have not changed it the windows defaults ie these settings...
  3. cmd default setting's

    in Windows 10 Software and Apps
    cmd default setting's: i messed with my cmd settings and I want to get them back to how they were before I messed with themDoes anyone have a way to get back the defaults and if not can I get screenshots of anyone settings for cmd who have not changed it the windows defaults ie these settings...
  4. 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...
  5. Bingo bash

    in Windows 10 Software and Apps
    Bingo bash: Keeps kicking me out of game up to three times why https://answers.microsoft.com/en-us/windows/forum/all/bingo-bash/1e5dd1e5-4424-4ab0-bc5b-ab9274638382
  6. 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...
  7. 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
  8. 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...
  9. 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....
  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...