Once the installation is successful, run the following command:
brewdoctor
If you get Your system is ready to brew., you can move on to the next step.
Brew anonymously collect User Behaviour data. To prevent analytics from ever being sent, run:
Homebrew Shell Completion
Brew installs completions and functions into: /opt/homebrew/share/zsh/site-functions when a formula offers them.
Shell completions for external Homebrew commands are not automatically installed. To opt-in to using completions for external commands (if provided), they need to be linked to HOMEBREW_PREFIX by running brew completions link.
To make Homebrew’s completions available in zsh, you must insert the Homebrew-managed zsh/site-functions path into your FPATH before initialising zsh’s completion facility. Add the following to your ~/.zshrc:
Note that, this snippet must be added in the top if ~/.zshrc
non-admin
[!CAUTION]
Installing homebrew in non-standared location like below, will cause some packages not work properly.
If you don't have admin/sudo access to your laptop(e.g., company issued laptop), recomend installing brew in your home directory.
In this case follow these steps
Then add brew to front of PATH by editing your shell profile file: .zprofile and adding below line:
Usage
Troubleshooting:
Example usage:
Homebrew keeps older versions of formulas installed on your system, in case you want to roll back to an older version.
That is rarely necessary, so you can do some cleanup to get rid of those old versions:
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
cd $HOME
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
eval "$($HOME/homebrew/bin/brew shellenv)"
brew config
brew doctor
brew update # self update brew
brew --prefix # show brew home
brew --cellar # show where brew install software
brew install <formula> # to install a package (or Formula in Homebrew vocabulary)
brew search TEXT|/REGEX/ # to search for formulas
brew info <formula> # to get more information about a formula
brew install --verbose --debug <formula>
brew list # to see what you have installed
brew list --versions # To see what you have installed
brew outdated # to see if any of your formulas need to be updated
brew upgrade <formula> # to upgrade a specific formula
brew uninstall<formula> # to uninstall a formula
brew cleanup
# If you want to see what formulae Homebrew would delete without actually deleting them, you can run:
brew cleanup --dry-run