macOS终端配置

  1. 切换macOS默认shell为bash
1
chsh -s /bin/bash
  1. 配置当前用户下的 ~/.bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
# 移除Mac默认shell警告
export BASH_SILENCE_DEPRECATION_WARNING=1

# 配置命令行颜色
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad

# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"
  1. 配置后要执行
1
source ~/.bash_profile

评论