0

I'm using mac Catalina and trying to change the terminal shell, but can't do it.

I did terminal => preferences => select command and type " /bin/zsh " => quit the terminal and re-open it => typed echo $SHELL on the terminal

I can see my username with -zsh on top of the terminal but after I run the command I can only see /bin/bash, not /bin/zsh.

Can anyone tell me how to fix this issue? I've been trying about ten times but still having the same problem...

zedfoxus
  • 35,121
  • 5
  • 64
  • 63
  • 1
    In the terminal, type this: `chsh -s /bin/zsh` and hit enter. Close terminal. Open it again and you should be in zsh. `echo $0` will tell you what shell you are running. – zedfoxus May 25 '20 at 05:30
  • I just added that as an answer so that others can find it useful. If that worked for you, you can put closure to your question by marking it as the answer. – zedfoxus May 25 '20 at 05:33
  • @Yuya : Since your login process was set to bash, the environment variable `SHELL` was also set to _bash_, so of course it is still set to _bash_ when your terminal creates a zsh shell as a child process. It does not make sense to enquire the `SHELL` variable to find out what shell you are. – user1934428 May 25 '20 at 06:14
  • @zedfoxus you're just fragmenting information for a couple of upvotes. This is a clear duplicate of https://stackoverflow.com/questions/453236/how-to-set-my-default-shell-on-mac hence the downvote – oguz ismail May 25 '20 at 06:15
  • Upvoted this question because it was clear, relevant for today’s times and problem statement was clear to me. – zedfoxus May 25 '20 at 13:37

1 Answers1

0

In your terminal, type this:

$> chsh -s /bin/zsh

Close your terminal and open it again. You should be in zsh.

If you want to know what shell you are running, type:

$> echo $0
-zsh
zedfoxus
  • 35,121
  • 5
  • 64
  • 63