bash
Bash 是最常見的 shell,Mac 中默認 shell 就是 bash。
[bash官網這篇文章]描述了喚起 bash shell 時加載的不同文件:login shell 加載 \~/.bash_profile ,而non-login shell 加載 \~/.bashrc 。
zsh
很多人的 mac 中會使用 zsh 而不是 bash,一大半是因為 oh-my-zsh 這個配置集,它兼容 bash,還有自動補全等好用的功能。zsh 的配置文件\~/.zshrc
配置:
https://segmentfault.com/a/1190000015283092
https://www.cnblogs.com/tangpg/p/9191391.html
問題:
在服務器上配置的時候,需要輸入用戶的密碼,然后一直有問題..所以沒法改為默認的
解決方法:每次用的時候輸入zsh
其他插件配置:
1.oh-my-zsh
2.git
3.zsh-autosuggestions(自動補全)
在安裝以上插件的時候,直接用:wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
這種方法失敗了,所以選擇手動安裝(成功!)
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc