系统配置
包管理器
安装
安装Command Line Tools
xcode-select --install
安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
换源
Brew源
cd "$(brew --repo)"git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
软件源
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.gitcd "$(brew --repo)"/Library/Taps/homebrew/homebrew-caskgit remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
Bottles 源
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrcsource ~/.zshrc
在brew update 报错,可以做如下检查,找到报错文件,进入该路径执行git相关操作
brew update --verbose

执行以下命令
git fetch --prune origingit pull --rebase origin master
shell
更换默认shell
chsh -s /bin/zsh
安装oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装插件
cd ~/.oh-my-zsh/custom/plugins/git clone https://github.com/zsh-users/zsh-autosuggestionsgit clone https://github.com/zsh-users/zsh-syntax-highlighting.git
