I’ve been using ZSH for years now as my shell. In that time, I’ve learned a few niceties to make the experience better. Namely, I’ve found the minimal oh-my-zsh prompt keeps out of the way and the git aliases super convenient. Plugins for autosuggestions, like in the fish shell, and syntax highlighting are also quite helpful. Antigen makes keeping plugins up-to-date a breeze.
This tutorial explains how to install ZSH and set it as your default shell on Ubuntu 20.04. Plus, it details how to install and configure Antigen, oh-my-zsh, autosuggestions, and syntax highlighting.
$ sudo apt install -y zsh
/etc/shellsso that is can be used as the default shell.
$ command -v zsh | sudo tee -a /etc/shells /usr/bin/zsh
Set the default shell to
$ chsh -s `which zsh` Changing shell for jordan. Password: Shell changed.
Now, open up a fresh terminal session to start using .
$ wget -q git.io/antigen $ sudo mkdir /usr/share/zsh-antigen $ sudo mv antigen /usr/share/zsh-antigen/antigen.zsh
When the bug is fixed, you can simply install the package with Aptitude as follows.
$ sudo apt install -y zsh-antigen
# Load the oh-my-zsh library antigen use oh-my-zsh antigen bundles <<EOBUNDLES # Bundles from the default repo (robbyrussell's oh-my-zsh) git # Fish-like auto suggestions zsh-users/zsh-autosuggestions # Extra zsh completions zsh-users/zsh-completions # Syntax highlighting bundle. zsh-users/zsh-syntax-highlighting EOBUNDLES # Load the theme antigen theme robbyrussell # Tell antigen that you're done antigen apply
Now, from the
.zshrcfile load Antigen and the
# Load Antigen source /usr/share/zsh-antigen/antigen.zsh # Load Antigen configurations antigen init ~/.antigenrc
Load the updated
$ source ~/.zshrc
Update the plugins as needed.
$ antigen update