How to run "brew" command in windows..?

Viewed 136313

It shows "'brew' is not recognized as an internal or external command" in windows command prompt.

enter image description here

I am trying to install codeigniter-reactjs-example from github, where first command is brew. How to run this command to install that project in Windows..?

5 Answers

It shows "'brew' is not recognized as an internal or external command" in windows command prompt.

Not anymore, 19 months later (Feb. 2019, compared to July 2017)

At least, not on Windows 10, in a WSL (Windows Subsystem for Linux) session.
As mentioned by Mike McQuaid

Homebrew 2.0.0 has been released (at @FOSDEM!) with official Linux and Windows 10 WSL support, brew cleanup running automatically (opt-out with HOMEBREW_NO_INSTALL_CLEANUP), no more options in Homebrew/core and no longer running on OS X 10.8 and older.

See Homebrew 2.0.0.

“Homebrew on Linux” is called “Linuxbrew”.
You can install it in your home directory, so it does not require sudo, and use it to install software that your host distribution’s package manager does not provide. Linuxbrew uses its own repository for formulae: Linuxbrew/homebrew-core.

So again, this is not native Windows support, but Linux (through the WSL layer, on Windows 10).

Use this

  • Download git bash

  • Run below command, this will install homebrew to your PC

  • now this can help you run brew command

bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • If you want to run directly without bash then It can be done using cmd also

  • If following with cmd then you need to add the location of homebrew downloaded folder to your environment path variables

Try this in windows CMD

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh

Now add this folder location "C:\Users\[NAME]\homebrew\" to path variable

TO add in Path Variables Follow below:

enter image description here

enter image description here

Related