Install Zsh
sudo apt update
sudo apt install zsh
Make Zsh your default shell
chsh -s $(which zsh)
Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install and Configure zsh-autosuggestions, syntax-highlighting
Now let’s install the zsh-autosuggestions
plugin, which provides command auto-suggestion based on your history.
-
Clone the plugin repository:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
-
Enable the plugin in your
.zshrc
file: Open your~/.zshrc
file using a text editor (e.g.,nano
,vim
,code
):nano ~/.zshrc
Find the line that starts with
plugins=(...)
. By default, it usually looks something likeplugins=(git)
.Add
zsh-autosuggestions and syntax-highlighting
to the list of plugins. It should look like this:plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
You can add other plugins later as you discover them.
-
Find Available Themes (Optional)
Oh My Zsh has a dedicated wiki page listing all its built-in themes with screenshots. This is the best place to browse and see what they look like:
- Oh My Zsh Themes Wiki: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
You can also find them locally in your system:
ls ~/.oh-my-zsh/themes/*.zsh-theme
This command will list all the theme files, but it won’t show you previews. The wiki page is much more useful for selection.
Some popular themes include:
-
agnoster
(requires a Powerline-compatible font) -
pure
(not built-in to OMZ, but a popular standalone) -
powerlevel10k
(not built-in to OMZ, but the most popular and customizable theme, also requires a Powerline-compatible font) -
robbyrussell
(the default Oh My Zsh theme) -
ys
-
muse
-
Look for the line that starts with
ZSH_THEME=
. By default, it’s usually set torobbyrussell
:ZSH_THEME="robbyrussell"
-
Change the value inside the double quotes (
""
) to the name of the theme you want to try. For example, if you want to try theagnoster
theme:ZSH_THEME="agnoster"
-
Important Note for
agnoster
andpowerlevel10k
: These themes use special characters (like arrows and icons) that require a “Powerline-compatible font” to display correctly. If you switch to them and see strange question marks or broken symbols, you’ll need to install a font likeMesloLGS NF
(recommended forpowerlevel10k
) or any other Powerline font (e.g., from Nerd Fonts). After installing the font, you’ll also need to configure your terminal emulator (e.g., iTerm2, Kitty, Alacritty, GNOME Terminal, etc.) to use that font.
Save and exit the .zshrc
file.
Reload your Zsh configuration
For the changes to take effect, you need to reload your ~/.zshrc
file.
source ~/.zshrc