When I log into a server running SunOS 5.10, my prompt initially is "-bash-3.2$"
Then when I run the following commands, I can see that the prompt is slightly different after typing bash
(it no longer begins with a dash), yet echo $SHELL gives the same result.
-bash-3.2$ echo $SHELL
/bin/bash
-bash-3.2$ bash
bash-3.2$ echo $SHELL
/bin/bash
What does this mean, and what implications does it have?
/etc/profile
,/etc/bashrc
,~/.bashrc
and~./bash_profile
. Also, as glenn already pointed the difference between login and nonlogin shells, can you try runningbash --login
?echo $0
instead ofecho $SHELL