This is a set of commands for installing Zsh on Ubuntu 18, 20 and 22.

Updating the system

sudo apt update && sudo apt dist-upgrade -y

Installing Zsh

sudo apt install zsh
zsh --version

Installing Oh-My-Zsh Plugin

On-My-Zsh plugin provides some amazing shell enhancements to ZSH.

You can install the plugin by typing this command in your terminal:

sudo apt install git-core curl fonts-powerline

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Link https://ohmyz.sh/#install

PLugins

Open the zsh config file like this:

nano ~/.zshrc

Default theme

I use the dieter theme at the moment. See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes for more themes.

ZSH_THEME="dieter"

Reload Oh-my-zsh

Use the command under for reloading zsh and activate the changes.

source ~/.zshrc