echo $0, I know I'm using
tcsh in my Ubuntu 13.04 terminal.
However no matter using
chsh -s /bin/bash or just typing
bash still can't make bash as my present shell. The interesting thing is that, if I type
sh, then my shell will be
sh. Finally I found a more interesting thing: each time after I typing
bash, I type
ps to see the change, I found I get two more lines: one is new bash PID, another is new tcsh PID, which means each time after I tried to use bash shell, system automatically change my shell back to tcsh immediately.
How can I solve this? Please help me!Thanks!
echo $0, you will get the name of the running process, the name of the file as was invoked on the command line, the name of the command currently being executed (see Special shell variables). The right command which will return your current shell where you are in is:
Therein lies probably your confusion. And yes, the right command to change your default shell is:
Better to use it without any arguments to see exactly what happens.