1.先安裝Brew命令,安裝命令以下:
git
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
2.安裝 PowerShell Core,命令以下github
brew cask install powershell
3.驗證安裝是否成功,macOS 終端中輸入「pwsh」可進入 PowerShellshell
後期更新,可執行一下兩個命令:bash
brew update brew cask upgrade powershell