Basic ZSH installation and configuration

Feb 27, 2024 · 1 min read

Git

To download and install ZSH, we first need to install git and curl

sudo apt install git curl

ZSH

Commands come from this source

# Install ZSH
sudo apt install zsh
# Set ZSH 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

Commands come from this source

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

Then edit the ~/.zshrc file

plugins=(
  # Other plugins...
  # Do not use `,` to separate the plugin list
  zsh-autosuggestions
)

ZSH Theme

To change ZSH theme, just edit the .zshrc file

nano ~/.zshrc

# Then update the following line with the theme name you want
ZSH_THEME="amuse"

Tabby

Although Ubuntu’s default terminal is functional, I prefer using Tabby which better fits my needs.

To install it, download the file matching your architecture (e.g. tabby-XXX-linux-x64.deb), then install it with the following command:

sudo apt install ./tabby-XXX-linux-x64.deb

Changing the default terminal (Gnome)

Once tabby (or another terminal) is installed, let’s set it as the default terminal.

Commands come from this source

gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/tabby
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"