查看支持的shell
cat /etc/shells
输出如下内容
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
输出列表即当前环境支持的bash
查看当前使用哪个shell
echo $SHELL
当前session会话使用某个shell
想让当前会话使用某个指定的shell,直接运行就可以。 如我想让当前terminal使用bash, 执行/bin/bash即可。
/bin/bash
或者
bash -c "clear && /bin/bash"
结束bash,执行 exit即可。
更改用户的默认shell
chsh -s /bin/zsh [用户名:模认当前用户]