系统启动什么样的shell程序取决于你个人的用户ID配置。在/etc/passwd文件中,在用户iD记录的第7个字段中列出了默认的shell程序。只要用户登录到某个虚拟控制台终端或是在GUI中启动终端仿真器,默认的shell程序就会开始运行。
在下面的例子中,用户christine使用GNU bash shell作为自己的默认shell程序:
$cat /etc/passwd
[...]
Christine:x:501:501:Christine B:/home/Christine:/bin/bash
$
bash shell程序位于/bin目录内。从长列表中可以看出/bin/bash(bash shell)是一个可以执行的程序:
$ ls -1F /bin/bash
-rwxr-xr-x. 1 root root 938832 Jul 18 2013 /bin/bash*
$
CentOS发行版中还有其他一些shell程序。其中包括tcsh,它源自最初的C shell:
$ ls -1F /bin/tcsh
-rwxr-xr-x. 1 root root 387328 Feb 21 2013 /bin/tcsh*
$
另外还包括ash shellde Debian版
$ ls -1F /bin/dash
-rwxr-xr-x. 1 root root 109672 Oct 17 2012 /bin/dash*
$
最后, C shell的软链接指向的是tcsh shell:
$ ls -1F /bin/csh
1rwxrwxrwx. 1 root root 4 Mar 18 15:16 /bin/csh -> tcsh*
$
这些shell程序各自都可以被设置成用户的默认shell 不过由于bash shell的广为流行,很少有人使用其他shell作为默认shell。
默认的交互shell会在用户登录某个虚拟控制台终端火灾GUI中运行终端仿真器时启动。不过还有一个默认shell时/bin/sh,他作为默认系统的shell