0

I accidentally changed my default macOS z shell to bash shell. How could I change back to the default macOS shell.

I wrongly entered

cd ~

/bin/bash
4
  • How did you change it?
    – mmmmmm
    Commented May 24, 2022 at 12:25
  • I wrongly copied the whole block and pasted it directly into the terminal window. Commented May 24, 2022 at 12:46
  • 4
    If that is all then you have not changed your shell - either open a new shell in Terminal.app or just hit ^d in the bash shell
    – mmmmmm
    Commented May 24, 2022 at 12:49
  • Thanks a lot! It works! And the following also works: support.apple.com/zh-tw/guide/terminal/trml113/mac Commented May 24, 2022 at 13:29

1 Answer 1

5

Running /bin/bash within zsh isn't different from running nano, it starts the new binary "on top" of the running zsh. So to get "back" to zsh you just need to quit the newly started bash shell by typing exit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .