Yesterday, I tried to change my default shell from bash to zsh on my mac. I installed zsh by running:
brew install zsh
Then I installed oh-my-zsh according to the guide from github. It's an open source framework for managing zsh configuration. It would save much of your time in configuring zsh. Here was a problem I have met that I cannot change my default shell after I ran:
chsh -s /bin/zsh
Then I found this page on stackoverflow and the description about chsh on linux man page. The description is as follows:
However, it will issue a warning if the shell is not listed in the /etc/shells file. On the other hand, it can also be configured such that it will only accept shells listed in this file, unless you are root.
It means that if the shell you specified is not in that file, it won't be considered a standard shell. So, it was necessary to add zsh to /etc/shells. Then the problem was solved.
zsh has a lot of themes which provides varies of beautiful prompt. All what you need to do is editing your ~/.zshrc, and modifying the environment vairiable, $ZSH_THEME. I prefer "aussiegeek", it provides an explicit format of my current directory and timestamp of commands.