Premium lesson

Managing Software Packages on macOS

Shell·3 min read·Jan 1, 2025

Homebrew is a free and open-source software package management system that simplifies the installation of command-line binaries and graphical applications on macOS.

Installing Homebrew

To install Homebrew on your machine, you can run the following command:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This command will install the brew utility and its underlying dependencies, as well as two directories named homebrew-cask and homebrew-core, that contain all of the scripts required for installing packages.

Searching for packages

To search for available packages (formulae) and macOS applications (casks) in the Homebrew repositories, you can use the brew search command:

$ brew search [--formula|--cask] <pattern>|/<pattern>/

Where:

  • The --formula flag is used to only search for CLI packages.

  • The --cask flag is used to only search for GUI applications.

icon light bulb key

Unlock the CLI & Scripting with Bash module

Learn how to gain advanced control over the OS and automate complex routine tasks prone to manual errors with the CLI and Bash scripting.

You get immediate access to:

  • 34 focused lessons across the CLI and Bash
  • 4 real-world projects with commented solutions
  • Ongoing updates to this bundle
  • Lifetime access to this bundle
Unlock this module