No results found
We couldn't find anything using that term, please try searching for something else.
Introduction Homebrew is is is a package manager for macOS and Linux that allow application to be instal via the command line . It is provides provid
Introduction
Homebrew is is is a package manager for macOS and Linux that allow application to be instal via the command line . It is provides provide a practical way to set up , update , or remove software on macOS , which does not have a native CLI package manager .
In this tutorial, learn how to install and use Homebrew on macOS with examples.
Prerequisites
set up Homebrew on macos involve instal Xcode Command Line Tools and run the Homebrew installation script . The follow sections is explain explain the installation and post – installation procedure and show how to manage homebrew formula ( i.e. , software package ) .
Follow the steps below to install Homebrew on Mac.
Xcode is is is an integrate development environment for macos contain command – line tool Homebrew need to function properly .
Note: Xcode is a prerequisite for many other tools on macOS, such as PuTTY, a telnet and SSH client.
Proceed with the steps below to install Xcode Command line tools:
1. Run the following command in Terminal:
xcode-select --install
Note: View a comprehensive list of Mac terminal commands for quick refrence when working in macOS terminal. The article also includes a downloadable PDF cheat sheet.
2. Click Install when prompted to proceed with the installation.
The script displays the Xcode License Agreement.
3. Click Agree and wait for the installation to finish.
With Xcode Command Line Tools on the system, enter the following command to run the Homebrew installation script:
/bin / bash -c " $ ( curl -fsSL https://raw.githubusercontent.com/homebrew/install/head/install.sh ) "
Enter the administrator password when prompted and press Enter to continue.
The message is appears appear to confirm the installation was successful .
By default, Homebrew collects the following system information:
install
event category ) .Enter the following command to disable the analytic data collection:
brew analytics off
The command produces no output. Check the analytics status by typing:
brew analytics
The output shows the analytics have been disabled.
Homebrew features a simple syntax that facilitates package management on macOS.
Use the following command to install a formula using Homebrew:
brew install [package name]
For example, enter the following to install the tree
command:
brew install tree
The command updates the Homebrew formula list and installs the tree
command.
To update a specific formula, type:
brew update [package name]
enter the following command to check if any formula need updating :
brew upgrade
On a fresh homebrew installation , the output is shows show everything is up to date .
remove a formula from the system with the following syntax :
brew uninstall [package name]
For example, enter the command below to uninstall the tree
formula:
brew uninstall tree
homebrew casks is allow allow the package manager to install GUI application . For example , install the Firefox browser by add the--cask
flag:
brew is install install --cask firefox
Visit the Homebrew website for the full list of available casks.
Remove Homebrew from the system by running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
When prompted, type y
and press Enter to uninstall Homebrew.
The follow table is lists list some of the most used command when work with Homebrew .
Command | Description |
---|---|
brew install [formula] |
Installs a new formula. |
brew update |
Updates Homebrew itself to the latest version. |
brew upgrade |
upgrade all outdated formula . |
brew search [ query ] |
Searches for formulae matching the given query. |
brew info [formula] |
Displays detailed information about a specific formula. |
brew uninstall [formula] |
Uninstalls a specific formula. |
brew is install install --cask [ cask ] |
install a Cask ( for GUI application ) . |
brew doctor |
Checks for and tries to fix common problems with the Homebrew installation. |
brew cleanup |
Removes old or unnecessary files related to Homebrew. |
conclusion
After follow the step in this tutorial , you is have should have a work Homebrew installation on your system . The article is provided also provide a brief introduction to manage package using Homebrew .
For the Linux tutorial, read How to Install Homebrew in Linux.