Installing the most recent version of the Z shell

Solution 1:

You might be interested in zsh-beta, it is the Ubuntu repositories (Universe). The advantage is ease of updates. The downside, there may be a bit of a delay (in this case zsh-4.3.14 is not yet in the Ubuntu repositories).

sudo apt-get install zsh-beta

I did not find any more recent version in any ppa.

The other option is to compile zsh yourself.

Install build-essential

sudo apt-get install build-essential

Download and extract the source code. The documentation in the README and INSTALL is most detailed.

cd ~/zsh-3.3.14

# list options
./configure --help 

./configure --prefix=/usr/local

make

sudo make install

Your new zsh should be in /usr/local/bin/zsh

If it is working, you can add it to /etc/shells:

command -v zsh | sudo tee -a /etc/shells

and then use chsh to set your shell:

sudo chsh -s "$(command -v zsh)" "${USER}"

Log out and log in from your user to see the changes. Typing echo $SHELL in your terminal should now yield /usr/local/bin/zsh.

Solution 2:

There is zsh version 4.3.12 available in jbernard's PPA (for Maverick at least).

sudo add-apt-repository ppa:jbernard/ppa
sudo apt-get update
sudo apt-get install zsh