1

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

2
  • tsh doesn't run because it realizes how awesome bash is and tries to hide its shame.
    – Kristina
    Jul 23, 2010 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, 2010 at 22:57

3 Answers 3

5

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.

1
  • 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, 2010 at 23:12
0

tcsh sets a lower-case variable named shell:

prompt> echo $shell
/usr/bin/tcsh
1
  • Also, ps will tell you what's running. Jul 23, 2010 at 23:28
0

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

You must log in to answer this question.