How to set my default shell on Mac?
1. sudo nano /etc/shells
2. add /usr/local/bin/fish to your list of shells
3. chsh -s /usr/local/bin/fish
You can use chsh to change a user's shell.
Run the following code, for instance, to change your shell to Zsh
chsh -s /bin/zsh
As described in the manpage, and by Lorin, if the shell is not known by the OS, you have to add it to its known list: /etc/shells
.
From Terminal:
Add Fish to
/etc/shells
, which will require an administrative password:sudo echo /usr/local/bin/fish >> /etc/shells
Make Fish your default shell with
chsh
:chsh -s /usr/local/bin/fish
From System Preferences:
User and Groups → ctrl-click on Current User → Advanced Options...
Change Login shell to
/usr/local/bin/fish
Press OK, log out and in again