升级你的 MacBook M1💻:安装使用brew 🍺和 fish 🐠

2,099 阅读1分钟

安装和使用 Homebrew

TinySnap-2023-04-26-00.09.03.png

官方:安装 Homebrew 命令

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

推荐:安装国内源的 brewcn

苹果电脑标准安装脚本:(推荐 优点全面 缺点慢一点)

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

使用 brew 安装浏览器:Google Chrome

hero-img_desktop-2x.webp

brew install google-chrome

使用 brew 安装 IDE:VSCode

home-screenshot-mac-2x.png

brew install visual-studio-code

使用 brew 安装效率工具:Raycast

944shots_so.png

brew install raycast

安装和使用 fish

TinySnap-2023-04-26-00.10.29.png

brew install fish
fish
fish_add_path /opt/homebrew/bin
echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/fish

使用 fish_config 可以在 web 管理 fish 配置

安装 oh-my-fish

curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish

安装 fisher

curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

使 fish 对 brew 的命令补全

fisher install laughedelic/brew-completions

安装 node 版本管理工具 nvm

fisher install jorgebucaran/nvm.fish
nvm install lts
set --universal nvm_default_version lts
node -v

安装 python 版本管理工具 miniconda

brew install miniconda
conda init (basename $SHELL)
conda activate base
python -V

删除 Dock 中所有图标

defaults delete com.apple.dock persistent-apps; killall Dock