Share via

BASH command not found on Windows 10

Anonymous
2021-03-07T21:36:27+00:00

So, when I try to use the bash command on cmd or PowerShell, I get errors saying that there is no such thing.

bash : The term 'bash' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

the spelling of the name, or if a path was included, verify that the path is correct and try again.

This is strange as I haven't touched anything that would uninstall it, and I thought it should be installed WITH Windows?

Before I did a system reset to try and fix some issues that I previously had, it used to work just fine, now it seems to have vanished into thin air. 

I don't understand where the command was gone, and how something that should be always installed with Windows can disappear? It's very frustrating that things like this can happen!

Do I need to add an environment variable or something? I'd rather not download anything third-party, I'd like to be able for Windows to reinstall it or something.

Thanks for any help. :)

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. Anonymous
    2021-03-08T10:53:38+00:00

    Thanks for the help. After turning WSL on, it still won't let me run the bash file I have. I want to know how I can run it with:

    bash .\filename.bash

    in PowerShell or command prompt like I used to be able to do.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Dumba_M3 7,200 Reputation points Volunteer Moderator
    2021-03-07T21:40:28+00:00

    If you want to use bash commands, you have to install Linux distros.

    How to Install and Use the Linux Bash Shell on Windows 10 (howtogeek.com)

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-03-07T22:03:28+00:00

    Thanks for the help, but, I don't understand. I have two Windows systems I can use bash, with a bash file to execute basic commands without any Linux features inside of PowerShell. Whatever I'm using certainly isn't to do with Linux and I never had to install anything in order to use it. I've heard that the bash command is automatically installed with Windows, so I'm at a loss at what to do.

    I don't know much about bash, but the bash file I need to run has things like "echo" when opening it in notepad, are you sure that we are talking about the same thing?

    Was this answer helpful?

    0 comments No comments
  4. Dumba_M3 7,200 Reputation points Volunteer Moderator
    2021-03-07T22:00:06+00:00

    It is a Linux command. I am not aware it was implemented in Windows OS.

    Bash get filename from given path on Linux or Unix - nixCraft (cyberciti.biz)

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2021-03-07T21:49:43+00:00

    Thanks, but that's not what I need. I need to run a simple bash file that repeatedly uses a python file which makes life a lot easier. On my previous install of Windows, I could just go into a command line and write:

    bash .\filename.bash

    But now, when I do that, it says there is no such command.

    This is a command that should work on a default Windows machine without anything being installed as far as I know.

    Was this answer helpful?

    0 comments No comments