Installing zsh
The zsh
package is available in all Linux and BSD-type distros that I’ve tried, as well as on OpenIndiana. The package name is zsh
in all cases, so you can just install it with your normal package manager.
On the BSD distros, you’ll have the same path problem that you had with bash
. That is, on BSD distros, the zsh
executable is in the /usr/local/bin/
directory, instead of the /bin/
directory. That’s okay, though. Just create a symbolic link in the /bin/
directory, as you did for bash
. On my FreeBSD machine, the command looks like this:
donnie@freebsd-zfs:~ $ which zsh
/usr/local/bin/zsh
donnie@freebsd-zfs:~ $ sudo ln -s /usr/local/bin/zsh /bin/zsh
donnie@freebsd-zfs:~ $ which zsh
/bin/zsh
donnie@freebsd-zfs:~ $
Now, if you need to run your zsh
scripts on Linux, OpenIndiana, and BSD machines, you can use the same shebang line, which looks like this:
#!/bin/zsh
If you want to use zsh
as your temporary login shell, you can just...