Linux · January 31, 2023 0

How to Install ZSH on Ubuntu using Oh My Zsh and Auto-suggestion on Zsh

Table of Content

The default Linux terminal may get your job done, but it looks dull. The third option is also an entirely different experience.

One such popular shell is Zsh . You can see its popularity from the fact that it is now the default shell in macOS.

How to Install ZSH on Ubuntu

First, let’s install the Zsh with some prerequisites:

sudo apt install zsh git fonts-font-awesome

Once you are done with the installation, you can start Zsh.


How to Customise ZSH on Ubuntu

1. Install Oh My Zsh on Ubuntu

Using Oh My Zsh is the easy way to manage Zsh’s themes.

To install Oh My Zsh, all you have to do is execute .

sh -c "$(wget -O -)"

install oh my zsh on ubuntu

2. Enable auto-suggestions on zsh

The auto-suggestion button will suggest the command based on your Zsh command history.

To add the auto-suggestion plugin, first, use the given command.

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

Now, to activate the auto-suggestion plugin:

nano ~/.zshrc

And add zsh-autosuggestions.

enable auto suggestion in zsh

Now, restart Zsh:


And now:

auto suggestion on zsh

3. Allowing syntax highlighting on Zsh.

To add the syntax highlighting using the given command:

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

Now open the zshrc file and type the following:

nano ~/.zshrc

And add zsh-syntax-highlighting to the list as shown:

enable syntax highlighting in zsh

Next, restart the terminal and start the Zsh.


And the following effect:

syntax highlighting in zsh

Change default shell on Ubuntu.

To change your default login shell, first.


And to change your default shell, enter the following path.


set zsh as a default login shell in ubuntu

Let me know if I missed something else.

%d bloggers like this: