适用Mac OS X 10.10及以上版本
1.修改打开文件数限制
sudo新建文件/Library/LaunchDaemons/limit.maxfiles.plist并添加如下内容:
Label limit.maxfiles ProgramArguments launchctl limit maxfiles 1048576 1048576 RunAtLoad ServiceIPC
2.修改打开进程数限制
sudo新建文件/Library/LaunchDaemons/limit.maxproc.plist并添加如下内容:
Label limit.maxproc ProgramArguments launchctl limit maxproc 2048 2048 RunAtLoad ServiceIPC
3. 添加ls列出详细信息别名,修改grep高亮显示
sudo打开文件/etc/profile并添加如下内容:
alias ll='ls -l'alias grep='grep --color=auto'
4.添加brew包管理程序并使用国内包镜像加速
终端直接运行命令如下:
ruby -e "$(curl -fsSL brew install gitcd "$(brew --repo)"git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.gitbrew update
5.添加Oh My Zsh并使用Zsh替换原有Bash
终端直接运行命令如下:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"