1.修改打开文件数限制git
sudo新建文件/Library/LaunchDaemons/limit.maxfiles.plist并添加以下内容:github
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxfiles</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxfiles</string> <string>1048576</string> <string>1048576</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist>
2.修改打开进程数限制ruby
sudo新建文件/Library/LaunchDaemons/limit.maxproc.plist并添加以下内容:app
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxproc</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxproc</string> <string>2048</string> <string>2048</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist>
3.添加ls列出详细信息别名,修改grep高亮显示curl
sudo打开文件/etc/profile并添加以下内容:url
alias ll='ls -l' alias grep='grep --color=auto'
4.添加brew包管理程序并使用国内包镜像加速code
终端直接运行命令以下:xml
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install git cd "$(brew --repo)" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git brew update
5.添加Oh My Zsh并使用Zsh替换原有Bash进程
终端直接运行命令以下:homebrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"