I referred to this answer to change my default shell How to change default shell to ZSH - chsh says "invalid shell"
After adding zsh to /etc/shells
and doing sudo chsh -s "$(command -v zsh)" "${USER}"
I ran echo $SHELL
(which gave no output btw so I thought that it must have ran successfully) and it gave me /bin/bash
I closed my shell and opened up a new shell session and zsh showed up so I thought it must have been fixed with a restart, after that when I ran echo $SHELL
in the zsh session it still gave me the same output /bin/bash``$SHELL --version
also gives me the bash version not the zsh one
everytime I do ctrl+alt+t I do get a zsh session but this echo $SHELL
output is making me suspicious.
UPDATE: I am running Ubuntu Budgie 18.04.3 and I got /bin/zsh
from echo $0
zsh
and thenecho $SHELL
it gave me:/usr/local/bin/bash
I guess you will need to change your environment variable, the output you get fromprintenv
– Rakib Fiha Dec 21 '19 at 13:07echo $SHELL
but in my case I usedchsh
to change my default (you don't mention changing your default). I don't see how your case is similar to mine? – Palash Nigam Dec 21 '19 at 13:09echo $0
? Could you add that in your question ? – Rakib Fiha Dec 21 '19 at 13:11/bin/zsh
fromecho $0
@RakibFiha – Palash Nigam Dec 21 '19 at 13:13zsh
shell. What happens if youexport SHELL=/bin/zsh
? – Rakib Fiha Dec 21 '19 at 13:27su --login $USER
I did this in my current zsh session and echo $SHELL gave me zsh this time but I am gonna have to do it everytime I start a new shell session is there anyway workaround for this? – Palash Nigam Dec 21 '19 at 13:38SHELL
is only set when you log in. – Kusalananda Dec 21 '19 at 13:42