安装homebrew

安装homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装后需要进行环境变量配置:
vim .bash_profile
export PATH=/opt/homebrew/bin:$PATH
source .bash_profile

运行提示中Next steps中命令:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/username/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

相关命令:
1.查看Homebrew命令:brew help
2.安装任意包:brew install ,eg:brew install node
3.卸载任意包:brew uninstall ,eg:brew uninstall git
4.查询可用包:brew search
5.查询已安装包列表:brew list
6.查看任意包信息:brew info
7.更新Homebrew:brew update
8.Homebrew帮助信息:brew -h
8.查看brew版本:brew -v
10.更新brew版本:brew update

参考:https://www.jianshu.com/p/f4c9cf0733ea

你可能感兴趣的:(安装homebrew)