Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell if homebrew is installed on Mac OS X

I am doing some Rails programming and I consistently see Homebrew referenced in solutions around the web but have never used it.

I also notice Homebrew in the terminal version 2.9 as an option next to "Shell -> New" from the terminal drop down but when I select homebrew and issue commands, they fail.

Usually with the "command not found" error.

Strangely enough I have been unable to locate a simple command to determine whether brew is installed or not.

How do I check to see if Homebrew is already installed on my Mac?

like image 290
Kmb40 Avatar asked Feb 05 '14 12:02

Kmb40


People also ask

Is Homebrew automatically installed on Mac?

By default, it installs Homebrew so you can use the brew command without typing the sudo command and providing your password. UPDATE: The below command is no longer necessary. Homebrew Cask is now automatically installed as part of Homebrew itself.

Where is Homebrew installed on Mac?

On Mac Intel, Homebrew installs itself into the /usr/local/bin directory, which is already configured for access by the shell with the macOS default $PATH environment variable (the default is set by the /usr/libexec/path_helper command).

Does Homebrew come with macOS?

Homebrew is a free macOS package manager that allows you to install, update, or remove software by running commands in the terminal.


1 Answers

brew help. If brew is there, you get output. If not, you get 'command not found'. If you need to check in a script, you can work out how to redirect output and check $?.

like image 96
bmargulies Avatar answered Oct 30 '22 12:10

bmargulies