Install Mac Software From Terminal With Homebrew
Pinterest Stumbleupon Whatsapp

Install (almost) any free Mac app by typing four words and hitting “Enter”. With Homebrew for Mac you can install thousands of programs with just a few keystrokes, and update them all with just a few more.

If you’ve spent any time looking into cool things to do with the Mac Terminal 4 Cool Things You Can Do With The Mac Terminal 4 Cool Things You Can Do With The Mac Terminal The Terminal is the Mac OS X analogue of the Windows command prompt, or CMD. It's a tool, as you probably already know, that allows you to control your computer using text commands, as opposed... Read More , you know that your Mac is missing a bunch of the commands many Linux distros come with out-of-the-box: WGet, for example. If you’ve tried to download and install these commands, you know that it can get… complicated. Your options are to find a binary that may or may not be sketchy (risky), or to compile the code from source yourself (potentially time-consuming).

Happily, there’s a better way. With Homebrew you can install any command utility in just a few keystrokes. Add Cask to your Homebrew and you can also install desktop apps, like Firefox and The GIMP, just as quickly. And updating everything is easy too.

Linux users know all about this: package managers like apt-get and yum are powerful tools for installing software quickly. Homebrew brings this power to your Mac; here’s how to use it.

Installing Software With Homebrew

So how does Homebrew work? Here’s an example: the command for installing WGet.

brew install wget

Install Mac Software From Terminal With Homebrew homebrew install wget

You should never run a Terminal command you don’t understand, so here’s a quick breakdown.

  • “brew” is the command for Homebrew.
  • “install” tells Homebrew that you want to install a program
  • “wget” is the name of the package you want to install.

Run the command and Homebrew will download, and then install, the program you’ve requested. The progress bar is kind of fun:

Install Mac Software From Terminal With Homebrew homebrew install progress

You don’t need to do anything else here: when the installation is done, you can start using WGet immediately. Easy, right? You can read our old article about installing WGet on your Mac How to Get Wget for Your Mac How to Get Wget for Your Mac Macs are great, with their neat UI and a Unix back-end. Sometimes you get the feeling you can do just about anything with them. Until one day you’re trying to do something simple and you... Read More if you want an idea of how long this process can take without HomeBrew.

There are an awful lot of packages offered by Homebrew – thousands. You can use the “search” command to find exact names. For example:

brew search elinks

This command tells Homebrew to “search” for packages called “elinks” (a Terminal-based browser). You’ll get a list of all matching packages, letting you know the precise name of the package you want. Alternatively, you can head to – you can search for packages there and find the complete command for installing them.

There are more tricks you can do with Homebrew. For example:

brew update

This one, as you might guess, will update Homebrew’s package list. You can then upgrade every package you’ve installed using this command:

brew upgrade

This is an easy way to keep your tools and software up-to-date, but note that it only works with software you’ve installed using HomeBrew. Read the Homebrew Wiki for more information.

Installing Homebrew On Your Mac

Are you ready to get started using Homebrew? Head to the official Homebrew website and you’ll find a command to run – I won’t paste it here in case it changes. The command downloads a script and runs it, installing Homewbrew. You’ll probably need to install the Command Line Tools for your Mac during this process.

Install Mac Software From Terminal With Homebrew 1 homebrew getting started

In the past I’ve run into hiccups with this – the automated download from OS X didn’t work, and I needed to install XCode. As of this writing, in 10.10 Yosemite, the Command Line Packages install from the above prompt without issue on a machine without XCode installed.

If everything goes well Homebrew should install in just a few minutes. If it doesn’t, first install xcode then try again.

Cask Install Mac Applications From The Command Line

Homebrew, on its own, is mostly for installing command line tools – not desktop Mac apps. You can change that, easily, by installing Homebrew Cask. With this, you might never need to “drag an icon” to install ever again. Here’s how to install:

brew install caskroom/cask/brew-cask

Once it’s installed, you have access to 2000+ Mac apps. The command for installing this software is a word longer:

brew cask install gimp

Install Mac Software From Terminal With Homebrew cask install gimp

As you can see, I need to specify that the program I’m installing is from Cask to Homebrew knows where to look. Once I enter the command, everything is hands-off: the program will download and install.

Install Mac Software From Terminal With Homebrew homebrew cask mac gimp installed

A lot of the best Mac apps out there are supported in spectacular lower-case command line fashion, including:

  • firefox
  • dropbox
  • flux
  • vlc
  • alfred
  • transmission

You can use the Homebrew “search” command to find apps, as I explained before, or you can use the search bar at the bottom of the Homebrew Cask homepage.

Commands You Should Install With Homebrew

Wondering what you can do with your new powers? Here are a few Terminal programs worth installing with Homebrew:

You can also find amazing Terminal commands CommandLineFu: Amazing Collection Of Command Line Gems [Linux & Mac] CommandLineFu: Amazing Collection Of Command Line Gems [Linux & Mac] Browse an assortment of amazingly useful commands. Whether you're an veteran system admin or a command-line neophyte striving to discover more, CommandLineFu is a vote-driven collection of commands that serves up thousands of ideas you... Read More at CommandLineFu. I’m sure there are a lot more awesome utilities out there for general users; please share any you know about in the comments below.

Oh, and Windows users: you’ve not left out here. A free program called Chocolately lets you install Windows software from the command prompt The Quickest Way To Install Windows Software: From The Command Prompt The Quickest Way To Install Windows Software: From The Command Prompt One simple command from you and software will be downloaded and installed automatically. Magic? No. Chocolatey - the apt-get equivalent for Windows. Read More , so check that out if this ability interests you.

What have you installed using Homebrew recently?

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Saul V.
    March 27, 2016 at 4:08 am

    Thank you, I'm a fan of open source and this, help me with my favorite software.

  2. XiaoLiz
    March 23, 2016 at 3:02 pm

    thank you very much

    • Justin Pot
      March 23, 2016 at 5:08 pm

      Happy to be helpful!

  3. User
    December 3, 2015 at 2:32 am

    Very helpful, thanks! Now for a question - is there a way to make a desktop icon for programs installed by brew? GPG or torsocks for example.

    • Justin Pot
      December 3, 2015 at 2:46 pm

      Are those command line apps? I don't know how to make an app shortcut for them, but I bet it would just take some scripting. Hmm...

  4. Anonymous
    July 5, 2015 at 5:23 pm


    • Justin Pot
      July 6, 2015 at 12:31 pm

      I'm glad this was useful!