终端工具
我用 WinTerm
安装 pkg
``` sudo installer -pkg ./powershell-7.3.0-preview.7-osx-x64.pkg -target / ```
安装 brew
brew install --cask powershell
brew install # 编译安装
brew install --cask # 下载编译后文件安装
brew 换国内源
https://www.jianshu.com/p/3d89785abe0f
换国内源
# brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# homebrew-bottles
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
# homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# homebrew-cask.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
恢复官方源
# brew.git
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
# homebrew-bottles
vi ~/.zshrc
然后,删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置
source ~/.zshrc
# homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
# homebrew-cask.git
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://github.com/Homebrew/homebrew-cask.git