Zsh Installation Guide

Zsh (Z Shell) is a powerful shell with many improvements over bash, including better completion, globbing, and plugin support.

Installation

Ubuntu/Debian

sudo apt update
sudo apt install -y zsh curl wget git

Fedora

sudo dnf install -y zsh curl wget git

Arch Linux

sudo pacman -S zsh

Set as Default Shell

chsh -s $(which zsh)

Install Oh My Zsh

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

zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Configure Plugins

Edit ~/.zshrc:

plugins=(git docker kubectl zsh-autosuggestions z-syntax-highlighting)

Useful Aliases

Add to ~/.zshrc:

alias ll='ls -lah'
alias la='ls -A'
alias l='ls -CF'
alias ..='cd ..'
alias ...='cd ../..'
alias grep='grep --color=auto'

Verification

zsh --version
echo $SHELL