Installation instructions

To install the package for zsh using pacman run

pacman -S zsh

Before proceeding with the next step to make zsh your default shell, you should ensure that it has been installed correctly by running zsh in an xterm. If the installation has gone smoothly you should now find yourself staring at a rather unfamiliar prompt, for now just type exit.

To change a users shell the usermod command is used, so root access is required. To proceed you need to know the full path to the zsh executable, so run

which zsh

Shown here as an example is the command I used to change my shell, substitue my values for your own.

usermod -s /usr/local/bin/zsh paul

You will now need to logout and log back in, and you should find yourself in zsh instead of BASH.

If you do not have root access but would still like to use zsh as your default shell, see this entry in the zsh FAQ.

Configuration

Although zsh is usable out of the box, it is almost certainly not set up the way you would like to use it, but due to the sheer amount of customisation available in zsh, creating a zsh config can be a daunting and time-consuming experience.

For this reason I have included below a sample configuration file, it provides a decent set of default options as well as giving examples of many ways that zsh can be customised. In order to use this configuration save it as a file named .zshrc. You can then apply the changes without needing to logout and then back in by running

There are many more ways that you can customise zsh, obviously far too many to list here, see the zsh manual for more information.

Uninstallation

If you decide that zsh is not the shell for you and you want to return to BASH you must first change your default shell before removing the package. Failure to do so will result in all kinds of problems.

First you need to find out the path to sh, do this by running

which sh

Then, as with the install, use the usermod program to modify your default shell