up vote 0 down vote favorite
share [g+] share [fb]

I tried to start a tcsh on my Fedora 7 (default shell is bash)

[ss@ssvm ~]$ tcsh
[ss@ssvm ~]$ echo $SHELL
/bin/bash

As you see, another bash shell started.

I looked at the tcsh file:

[ss@ssvm ~]$ ll /bin/tcsh
-rwxr-xr-x 1 root root 345348 2007-02-26 23:58 /bin/tcsh
[ss@ssvm ~]$ ll /bin/csh
lrwxrwxrwx 1 root root 4 2010-03-07 13:13 /bin/csh -> tcsh

It is not a link (but csh is). I don't understand why this is happening. Please let me know if you have ideas or you require further information. Thanks!

XM

link|improve this question
tsh doesn't run because it realizes how awesome bash is and tries to hide its shame. – Nick Brooks Jul 23 '10 at 22:55
Then it forgot to change its binary to a link to bash so it won't bother any more... – X.M. Jul 23 '10 at 22:57
feedback

migrated from stackoverflow.com Jul 23 '10 at 23:44

This question came from our site for professional and enthusiast programmers.

3 Answers

Short answer: the SHELL environment variable represents the default shell for your user profile, not the shell you are currently talking to. It is used by programs that spawn subshells.

Alternately, check your .cshrc for an exec bash command. I used to do that at a site where users were not allowed to change their default shell from csh.

link|improve this answer
Thanks Jeffrey. I misunderstood the usage of $SHELL. There is no 'exec bash' in the rc files. Actually tcsh was started :) I used "echo $0" to check it and it is tcsh indeed. – X.M. Jul 23 '10 at 23:12
feedback

tcsh sets a lower-case variable named shell:

prompt> echo $shell
/usr/bin/tcsh
link|improve this answer
Thanks! This is useful. – X.M. Jul 23 '10 at 23:21
Also, ps will tell you what's running. – Dennis Williamson Jul 23 '10 at 23:28
feedback

try executing echo $0 which will give your current shell name. refer this for more information on changing shells

link|improve this answer
feedback

Your Answer

 
or
required, but never shown