2. What is Homebrew?
• Open source package manager software
• Simplifies installing apps on macOS ( and linux)
• Developed by : Max Howell
• Initial release : May 2009
• Stable release : June 2022
• Written in : Ruby
3. Package managers
• Set of tools
• automate the process of:
• installing, upgrading, configuring
• and removing programs
• Examples :
• npm and yarn (nodejs)
• steam(windows)
• rpm(redhat)
• conda and pip (python)
4. Homebrew Description
• Homebrew is the easiest and most flexible way
to install the UNIX tools Apple didn’t include
with macOS
• It can also install software not packaged for
your Linux distribution to your home directory
without requiring sudo
5. Some Terminology
• Formula : each package is called
formula
• Cask : an extension to brew that allows
management of graphical GUI
applications
• Cellar : A place where homebrew
installs things
• Keg: installation destination directory
of a given formula version
• Bottle :Bottles are Homebrew's binary
packages. They are produced by
installing a formula
• Tap : directory of formula and cask
6. Essential Commands
• install formula : install a formula
• uninstall formula : uninstalls
formula
• list : List all installed formulae
• Formulae : List all locally installable
formulae including short names
7. How to setup
• Step 1 : install dependencies :
• gcc compiler, git, curl and procps( used for monitoring system process)
sudo apt-get install build-essential procps curl file git
• Step 2 : install Homebrew:
/bin/bash -c "$(curl –fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)“
• Add to path variable
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)“
• Step 3 : verify installation
brew doctor
Will tell you if any error
Brew install hello
Double check for installation error by installing the sample project hello!
8. Using brew command for installing, removing and
managing packages
• To install a package with brew, use the install option:
brew install package_name
• To remove a brew package, you can use either remove or uninstall option. both
works the same.
brew remove package_name
• list the installed brew packages with this command:
brew list
• remove the unneeded dependencies with the autoremove option:
brew autoremove