Most modern distributions still ship with Bash as the default shell. While there is absolutely nothing wrong with Bash in the slightest there is another popular kid on the block called ZSH. ZSH can do most if not all the things Bash can do but with a ton of extra features to boot.

It is completely modular and can be installed and configured for low-end systems while also being able to be completely tricked out if performance is of no concern. Let's install and configure this amazing shell!

sudo pacman -S zsh zsh-completions

Run it once to configure the default settings.


Install Antigen for advanced plugin management

yay -S antigen-git

Add the following source to your ~/.zshrc file:
source /usr/share/zsh/scripts/antigen/antigen.zsh

Add some awesome plugins like Git support and Syntax hightlighting

# Load the oh-my-zsh's library.
antigen use oh-my-zsh

# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git

# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting

# Load the theme.
antigen theme af-magic

# Tell antigen that you're done.
antigen apply

Play around with it and if you like it set as default shell for your user.

chsh -s $(which zsh)


Make ZSH look for a .aliases file.

echo '' >> .zshrc
echo 'source $HOME/.aliases' >> .zshrc

Pacman ZSH hook

Install a Pacman hook to update the mirrorlist to specified criterea upon upgrading the pacman-mirrorlist package.

sudo mkdir -p /etc/pacman.d/hooks

Create a new file in /etc/pacman.d/hooks/zshupgrade.hook and paste the following code:

Operation = Upgrade
Type = Package
Target = zsh

Description = Reload zshrc after upgrade
When = PostTransaction
Exec = /usr/bin/env sh -c "/home/<USER>/.zshrc"

Now every time the zsh package gets upgraded we reload the zsh shell.



Added useful Pacman hook for refreshing your zsh shell session after zsh package update. Credits: Tead.

Added document history for transparency sake.