Thursday, May 2, 2024
60
rated 0 times [  60] [ 0]  / answers: 1 / hits: 66230  / 3 Years ago, sun, september 5, 2021, 4:46:46

I'm trying to permanently change my shell to zsh using chsh command, but it's not working.



zsh is installed (via apt) and works fine when I invoke it directly from a bash prompt terminal. But I can't get zsh to load in terminals by default, and chsh is doing something weird:



$ echo $SHELL
/bin/bash
$ which zsh
/usr/bin/zsh
$ chsh -s /usr/bin/zsh
Password:
$ echo $SHELL
/bin/bash
$ grep kurtosis /etc/passwd
kurtosis:x:1000:1000:kurtosis,,,:/home/kurtosis:/usr/bin/zsh


It appears chsh has managed to correctly change /etc/passwd, but not the $SHELL env variable. As such, new terminals always start in bash and not zsh.



I'm not sure where to look to troubleshoot this. .bashrc, even though it's not invoked until the shell is specified? Any help appreciated.


More From » command-line

 Answers
1

You need to log out again for these changes to take effect. The shell defined in the /etc/passwd file is your login shell :-) So you need to log in actually for that.


[#35191] Sunday, September 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;