Command not found: /usr/local/bin/zsh
Homebrew installs programs under /usr/local
on intel but under /opt/homebrew
on arm. So once you've installed Homebrew's zsh, it will be at /opt/homebrew/bin/zsh
. The zsh that ships with macOS is at /bin/zsh
.
If you've hard-coded the path /usr/local/bin/zsh
somewhere, you can use one of the following commands to make that exist:
sudo ln -s /bin/zsh /usr/local/bin
sudo ln -s /opt/homebrew/bin/zsh /usr/local/bin
Your attempt with ln
didn't work because you passed the arguments to ln
in the wrong order, and also because the preinstalled zsh is in /bin
and not /usr/bin
.
If you want to change your login shell, you can use the following command:
chsh -s /bin/zsh
Or chsh -s /opt/homebrew/bin/zsh
to change to Homebrew's zsh.
Modern macOS comes with a recent version of zsh, so there's no advantage to using the one from Homebrew. It's not like bash where macOS ships only an ancient version.