Homebrew is a package manager similar to Yum on CentOS and Apt-get on Ubuntu. You may at times need packages that are available on other Linux distributions that are not, out of the box, available on your Mac.
To install Homebrew is pretty straight forward, open a terminal window and issue the following:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You might get a pop saying that you require Developer Tools, hit yes when prompted.
That’s it, you should now have Homebrew installed. Test it out by installing a bandwidth monitor Vnstat
brew install vnstat
Once installed, start vnstat by issuing the command: vnstat at the terminal.