Apple - Why can't I use zsh?

@bmike has already offered the easiest solution, but I wanted to go back to the GUI instructions not working.

I found that Apple’s instructions here can be confusing. Control-Clicking will not do anything unless you first “unlock” the Users & Groups pane, as shown below in the blue box:

screenshot of Users and Groups system preference pane.

Once you have it unlocked, be sure you are clicking in the white-area on the left to access “Advanced Options…” as shown above with the blue arrow.

Then you should be able to access the options, including shell, from the Advanced pane.

Don’t use sudo directly without some additional switches - your invocation would change root’s shell, not your user account.

If your short name is mike (you can check with whoami or who am i

sudo -s
chsh /bin/zsh mike

Or if you know an admin short name and password you could skip the sudo initially

chsh -u admin /bin/zsh

@ me if you still have issues, there are a couple other ways to skin this cat, but I think once you specify the other user and su to root first, you should be set. It should have just worked out of the box, but hopefully we don’t have to go down that rabbit trail.

This is a somewhat speculative answer, on the assumption that your account is coming from an Active Directory domain your Mac is bound to. You can check this by running:

dscl /Search -read /Users/"$USER" | grep AppleMetaNodeLocation

If it prints something like "AppleMetaNodeLocation: /Active Directory/<somedomain>", then your account is coming from AD, and this answer might work for you. I say "might" because I don't have a setup to test properly, and haven't messed with this stuff for several versions. If it doesn't print something about "/Active Directory/", this answer is not relevant.

Before proceeding further, I'd make a record of your current AD binding configuration. Run:

sudo dsconfigad -show

...and save its output somewhere, so you can refer to it if you need to put things back the way they were. If it doesn't print anything, then there's something weirder going on and I wouldn't recommend proceeding until you know what it is. It'll probably list something like "Default user Shell = /bin/bash"; if so, I'm pretty sure that's the root of your problem. To change this, run:

sudo dsconfigad -shell /bin/zsh

...and then probably reboot to make sure change takes effect. Oh, and check your Terminal preferences to make sure they're not overriding that (see here).

Explanation (if you care): in unix (including macOS), each user account record has an attribute that controls their default shell. Changing the user's shell (with chsh or whatever) edits the user's record to change that attribute value. But Active Directory accounts don't have this attribute (unless the AD domain has Identity Management for Unix enabled -- but that's deprecated), so Apple's AD connector fakes up a value for this on its own. Because it's fake, it can't really be changed. But you can change what value the AD connector uses to fake it up, and that's what the dsconfigad command does.