freebsd 修改用bash shell

linux下有不同的shell,这个我是知道,不过一般的发行版,都是用bash shell,所以我也就没有折腾过。不过到了freebsd,你就肯定要搞明白。


freebsd,如果你缺省安装,是使用csh shell。怎么修改bash shell 呢?


1:安装bash shell


cd /usr/ports/shells/bash

make install clean


2:查看当前的shell


echo $0


3:修改缺省bash shell


#whereis bash

bash: /usr/local/bin/bash /usr/local/man/man1/bash.1.gz /usr/ports/shells/bash

#chsh -s /usr/local/bin/bash

chsh: user information updated


这个时候,你退出再登录


[root@FreeBSD ~]


4:改成csh


步骤也是一样

freebsd# whereis csh

csh: /bin/csh /usr/share/man/man1/csh.1.gz

#chsh -s /bin/csh