Homebrew官方网站:https://brew.sh/
1,安装brew,Mac中打开Termal输入命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如果提示/usr/bin/ruby找不到,用which ruby查看ruby的安装位置。
2,使用brew安装软件
brew install tree
3,查看已安装的软件
brew list
4,卸载软件
brew uninstall tree
5,其它常用brew命令
brew search /tree*/ 需要搜索的内容包含在/之内
brew update 更新brew
brew home 用浏览器打开brew的官方网站
brew info 显示软件信息
brew deps 显示包依赖
tree 命令是显示当前文件夹的目录结构,是个很有用的工具:
MacPro:mysite1 apple$ tree . ├── db.sqlite3 ├── manage.py ├── mysite1 │ ├── __init__.py │ ├── settings.py │ ├── settings.py.bak │ ├── urls.py │ ├── urls.py.bak │ ├── views.py │ ├── views.py.bak │ └── wsgi.py └── west ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ └── __init__.py ├── models.py ├── tests.py ├── urls.py ├── urls.py.bak ├── views.py └── views.py.bak 3 directories, 20 files