Mac 常用软件

Homebrew

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 安装方式一:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 安装方式二(推荐):
# 浏览器访问 install.sh,下载后编辑 install.sh
# 将 https://github.com/Homebrew/brew 替换为 https://github.com.cnpmjs.org/Homebrew/brew.git
sh install.sh
# 当代码运行到 Tapping homebrew/core 时,Ctrl + C 退出进程
cd /usr/local/Homebrew/Library/Taps/homebrew
# 下载 homebrew-core
git clone https://github.com.cnpmjs.org/Homebrew/homebrew-core.git
# 下载 homebrew-services
git clone https://github.com.cnpmjs.org/Homebrew/homebrew-services.git

brew update

iTerm2 + zsh

1
2
3
4
5
6
7
8
9
10
11
# 设置默认终端软件,左上角菜单栏:iTerm2 → Make iTerm2 Default Term

# 安装 oh-my-zsh(如果太慢,就浏览器访问 install.sh,下载后运行 sh install.sh)
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# 配置主题,修改 ZSH_THEME="ys"
vim ~/.zshrc

# 下载配色包 - https://github.com/mbadolato/iTerm2-Color-Schemes.git
# 配色方案 iTerm2-Color-Schemes-master/schemes/Mirage.itermcolors
iTerm2 -> Prefenences -> Profiles -> Colors -> Color Presets -> Import 导入配色方案

Git 安装并替换默认 Git

1
2
3
4
5
6
7
# 下载并安装 git,https://git-scm.com/download/mac 选择 Binary installer 下的 installer
# 安装后的 git 位于 /usr/local/bin/git

# 重命名默认 git
sudo mv /usr/bin/git /usr/bin/git-system
# 若提示 Operation not permitted, 则需要关闭 rootless 机制, 然后重新运行上面的命令
重启 -> command + r (恢复模式)-> 打开终端 -> 输入命令 csrutil disable -> 重启
0%