因ssh登陆时不会加载.bashrc而是加载.bash_profile,因此以ssh的默认登陆不会是bash,只要在.bash_profile中添加如下代码便可:shell
if [ -f ~/.bashrc ]; then . ~/.bashrc fi