To install Homebrew, open your terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
A comprehensive guide to Homebrew, the package manager for macOS. This cheat sheet covers installation, basic commands, package management, and troubleshooting.
To install Homebrew, open your terminal and run the following command:
|
This script will guide you through the installation process. Follow the prompts, and enter your password if required. |
After installation, it’s important to add Homebrew to your Add these lines to your
|
Then, apply the changes to your current session:
|
Alternatively, for interactive setup in
|
To ensure Homebrew is installed correctly, run:
This command will diagnose common issues and provide solutions. |
If any problems are reported, follow the suggested steps to resolve them before proceeding. |
|
Installs the specified package. Example:
|
|
Reinstalls the specified package. Useful for fixing broken installations. Example:
|
|
Installs a specific version of a formula. Example:
|
|
Updates Homebrew’s package list. |
|
Upgrades all outdated packages. |
|
Upgrades a specific package. Example:
|
|
Uninstalls the specified package. Example:
|
|
Removes old versions of packages from the Homebrew cache. |
|
Removes old versions of specific packages from the Homebrew cache. Example:
|
|
Installs the specified application using Brew Cask. Example:
|
|
Reinstalls the specified application using Brew Cask. Example:
|
To list all applications installed via Brew Cask, use the following command:
|
|
Uninstalls the specified application using Brew Cask. Example:
|
|
Searches for packages containing the specified keyword. Example:
|
|
Searches using a regular expression. Example:
|
|
Displays information about a package, including version, dependencies, and caveats. Example:
|
|
Lists the dependencies of a package. Example:
|
|
Links a package’s files into Example:
|
|
Unlinks a package’s files from Example:
|