What is a brew?
If you used a linux before, you had to meet apt-get on debian/ubuntu system or yum on centos/red hat. Brew as well as these tools is a package manager which allows you to install (mostly) linux libs and tools on your mac! You can also create your own packages to easy install on another macs.
So, it’s very easy. You have to run only your terminal and paste this code:
/usr/bin/ruby \ -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
What does that code do?
1. Get script from
2. Do it by using ruby
How to use?
Brew provides a lot of commands that you can use, honestly you should know only a few of them, which you will be using in common work. Let’s start with
brew install and
brew update. By using it you can install some package and update it, for example:
brew install apache2
What does it do? Install apache2 on you mac of course.
If you just want to upgrade apache, you have to run similar command, look at:
brew update apache2
And that’s it!
Another useful command is
brew services. Because of the fact that a lot tools work as daemon (on background) you can look at what is exactly working and turn it on or turn it off.
They do not exist! Yes, I’m just kidding, before “the brew ages” there was something called “macport”. Those tools have still more available packages but brew is easier and more popular now IMO.
Do you have a problem? Just run another command
brew doctor which show you potential problems and propositions how to fix it.