一、查看当前发行版可以使用的shell:
chao@chao:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
二、查看当前使用的shell :
chao@chao:~$ echo $0
bash
三、查看当前用户(默认)使用的shell:
chao@chao:~$ echo $SHELL
/bin/bash
四、环境变量中shell的匹配查找
chao@chao:~$ env | grep SHELL
SHELL=/bin/bash
四、口令文件中shell的匹配查找
chao@chao:~$ cat /etc/passwd | grep chao
chao:x:1000:1000:chao,340,6733,6733:/home/chao:/bin/bash
chao@chao:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
二、查看当前使用的shell :
chao@chao:~$ echo $0
bash
三、查看当前用户(默认)使用的shell:
chao@chao:~$ echo $SHELL
/bin/bash
四、环境变量中shell的匹配查找
chao@chao:~$ env | grep SHELL
SHELL=/bin/bash
四、口令文件中shell的匹配查找
chao@chao:~$ cat /etc/passwd | grep chao
chao:x:1000:1000:chao,340,6733,6733:/home/chao:/bin/bash