Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com 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
add comment

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.

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
add comment

tcsh sets a lower-case variable named shell:

prompt> echo $shell
/usr/bin/tcsh
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.