New to macOS, and I was trying to change default shell from zsh to fish, but I set wrong default shell path.
Here's what I did:
brew install fish
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/bin/fish
I should have typed chsh -s /opt/homebrew/bin/fish, but I typed chsh -s /usr/bin/fish.
Now iterm2 stops with warning message : A session ended very soon after starting. Check that the command in profile "Default" is correct., so I can't run the chsh -s command.
How can I fix this?
Can I change default shell path without opening terminal?