Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

[ss@ssvm ~]$ tcsh
[ss@ssvm ~]$ echo $SHELL

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!


share|improve this question

migrated from Jul 23 '10 at 23:44

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

tsh doesn't run because it realizes how awesome bash is and tries to hide its shame. – Christina 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

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.

share|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

tcsh sets a lower-case variable named shell:

prompt> echo $shell
share|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

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

share|improve this answer

You must log in to answer this question.