You're doing it wrong. You should be using the
chsh command to change your user's shell.
$ chsh -s /usr/local/bin/fish
On OSX you apparently have to add this to the
/etc/shells file as described in this issue titled: OS X refuses to setting fish as default shell(installed via Homebrew) #989.
To do this you need to run this command to add it to
$ echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
After that this file will look like this:
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
With the above complete, try the
chsh -s ... command again and it should work.
This issue seems to arise with how
fish was installed. If you use
brew install fish then it's likely that
fish was properly added to
/etc/shells. If you install
fish through some other means, then it's likely that it did not get added as an entry to the
In some cases the permissions on
/etc itself may be the issue.
$ ll /etc
lrwxr-xr-x@ 1 root wheel 11B Jan 26 2016 /etc -> private/etc
$ ll -d private/etc/
drwxr-xr-x 96 root wheel 3.2K Jul 12 18:53 private/etc/
These permissions are acceptable, if they're not, you can modify them like this:
$ sudo mount -uw /
$ sudo chmod a+x private/etc
With the above changes,
chsh -s ... should now work.