Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 9477  / 2 Years ago, sun, january 16, 2022, 2:09:44

By typing 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!


More From » 13.04

 Answers
1

By using 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:



echo $SHELL


Therein lies probably your confusion. And yes, the right command to change your default shell is:



chsh


Better to use it without any arguments to see exactly what happens.


[#29081] Monday, January 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ellter

Total Points: 311
Total Questions: 111
Total Answers: 117

Location: Lithuania
Member since Thu, Jul 14, 2022
2 Years ago
;