If you are looking for an easy way to install applications on your Mac by just using Terminal commands, then you should try the Homebrew on your Mac. Homebrew and Homebrew cask will not only make it possible for you to easily install many Mac applications, but it will also let you different tasks via. Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac. For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix. Instructions for a supported install of Homebrew are on the homepage. This script installs Homebrew to /usr/local so that you don’t need sudo when you brew install.It is a careful script; it can be run even if you have stuff installed to /usr/local already. It tells you exactly what it will do before it does it too. Homebrew is ruby, not python. It is to an extant self-explanatory. Searching “homebrew mac” will return it pretty near the top. It, like all package managers imports a lot of stuff with each.
![Homebrew For Mac Homebrew For Mac](/uploads/1/3/3/8/133894761/970604778.jpg)
I thought I should mention the very easy Homebrew package installer for Mac OS X. I’ve found it quite simple to use and have not turned back since I blew away my MacPorts.
You can find Homebrew on gitub and you can find the recommended installation instructions there which are as follows.
This will download the “go” ruby script and execute it in one go. If you are unsure or just curious and can read ruby code, then you can see this script here. https://brownal418.weebly.com/blog/used-mac-pro-for-sale.
In brief, this script changes permissions on various directories, downloads the Homebrew install files and installs them under /usr/local
Before I ran this install, I blew away my MacPorts installation using these instructions, which suggests the following…
Since Apple does not touch /usr/local I cleaned that out too, since anything in there on my Mac would have been installed by MacPorts. Homebrew installs under /usr/local and I wanted it to be nice and clean. Doing this will depend on what you’ve been up to with your Mac.
Some key files that will be installed by the installer are
This script does all the magic of installing, uninstalling, listing installed packages, showing package information and other tasks.
Homebrew For Mac Os X
This directory is where the files are installed for the packages you install. You can see some of the package directories I have installed on this machine.
Once, you’re installed you should be able to run brew install to install packages.
Packages are first downloaded to /Library/Caches/Homebrew/, so if you do uninstall and re-install, you will not have to re-download them a second time.
Here’s a dump of the files my cache directory.
I will demonstrate installing Mongodb, which is a “scalable, high-performance, open source, document-oriented database”. Think “NoSQL”.
Here’s the output
A command I really like is the info command.
It will give you all the information you need for a particular package for starting, stopping, restarting or other actions pertinent the service you installed. If will be similar to the information output when you first install a package. It’s good to know about this command so that you can always find the maintenance commands.
Here is an example of the info command for the postgresql package.
brew list will tell you which packages are installed.
Command for screenshot on macbook. brew help will give you the following
I hope you find this quick intro to Homebrew helpful. Please leave a comment to question.
Homebrew is the missing package manager for Macs and OS X. With Homebrew you can easily install apps (mostly command line apps) that can offer additional functionality that our Apple computers are missing. There are some other package managers for Macs but since Homebrew is the most popular and my favourite one I am going to show how you can install it.
Requirements for Installing Homebrew on Mac OS
A Mac running Mac OS X 10.10 or later, though earlier versions are sort of supported
- Basic knowledge of the command line and using bash or zsh
The easiest way to install Homebrew is by using the official command as shown in the documentation which is using ruby and curl.
Homebrew For Mac Os
Steps to install Homebrew:
Open terminal on your mac. You can go to spotlight and type terminal to find it easily (alternative you can find it on /Applications/Utilities/).
Install Brew
- Enter the command bellow.
3. Hit Return and the script will run. It will output to your terminal a log of what is going to install. Hit Return to continue or any other key to abort.
4. It might ask for sudo privileges. If this happens you will have to type your admin password and hit Return again.
Notes: Command line tools (Apple's XCode) will be installed after this guide.
The installation will look like as the image below.
When the installation finishes successfully it will look as the image below.
By default Homebrew is sending anonymous data and analytics. You can find additional information here. You can choose to opt-out by running the command.
Installing Software through Homebrew on Mac
Now since you have Homebrew on your machine you can do
brew help
to see what commands are available. To install a package you can do brew install wget
which will install wget on your machine.How to Remove Homebrew
Simply run (on your terminal) the command below.
Homebrew For Mac Download
ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)'
Homebrew Mac Download
Enjoy Homebrew and don't forget to subscribe. We are going to show the best packages from Homebrew and many more tips and tricks to use Homebrew effectively in later posts.