Install Homebrew and Homebrew Cask
First, you’ll need the command-line tools for Xcode installed. On a modern Mac OS X system, you can install these just by running the following command in a Terminal window. You could also install the full
Xcode application from Apple, if you prefer — but that takes up more space on your Mac and isn’t necessary.
xcode-select --install
Next, install
Homebrew. You can just open a Terminal window, copy-paste the following command, and press Enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This script informs you what it will do. Press Enter and then provide your password to install it. By default, it installs Homebrew so you can use the brew command without typing the sudo command and providing your password.
Run the following command once you’re done to ensure Homebrew is installed and working properly:
brew doctor
Once you’re done, run the following command to install
Homebrew Cask. It uses Homebrew to install Cask:
brew install caskroom/cask/brew-cask
Install Graphical Apps With Homebrew Cask
Now you can get started installing those graphical apps you want. This involves some very simple commands. To search for one, use the following command:
brew cask search name
To install an app, run the following command. Homebrew Cask will automatically download it, extract the app, and install it to your Applications folder.
brew cask install name
To uninstall an app with Homebrew Cask, run the following command:
brew cask uninstall name
Install Open-source Utilities With Homebrew
The Homebrew command is the underlying package manager that installs all those UNIX and open-source utilities you might want. It’s the easiest way to install them on Mac OS X, just as it is on Linux. Like Homebrew Cask, it uses simple commands.
To search for a utility:
brew search name
To download and install that package:
brew install name
To remove that package from your system later:
brew remove name
Unfortunately, there’s no graphical user interface for Homebrew Cask. This is a shame, because — while we geeks love easy terminal utilities — many people could benefit from easy software installation on Mac OS X. They can avoid all the downloading DMG files and clicking around. And, since Mac OS X is now home to Windows-style installer crapware, Homebrew Cask is a way around that.